Skip to main content
A module is one RSL file and the definitions it holds. Another module reads those definitions through use. So one rating function serves every process that needs its premium.

use

A process in the staffing example reads its rating function in three lines:
A module reads each value of another module through a call, by the value’s path. The used module compiles alone, and its steps stay free to change. Each read is a call, so one spelling marks each place that depends on the other module. A table row is the one exception: ts.Tables.GlClass[self.class] reads it as a lookup.

RSL 0.4 components

rslc check holds each file to its component, and E-COMPONENT names a form that belongs to the other kind. In RSL 0.5, rslc check checks references in every function body in the module and the modules it uses. It also compiles a selected function entry. A module can pass this check without an entry. Exporting the module for rating requires a selected rater function.

Calling a compiled rater from RSL 0.5

An RSL 0.5 process can use a portable compiled rater artifact beside its entry file. Name the artifact after the module the process uses, for example example.rating.rslart, then write use rated = example.rating. The artifact may have been compiled from an RSL 0.4 or 0.5 rater. Its callable entry is rated.rate(record), and the result names are the artifact’s published outcomes. The compiler checks the record and result against the artifact’s kernel and contract. A process bundle embeds the exact artifact and checks its implementation pin and call links when it opens.

Other sharing forms