You can put declarations in module files to organise your code.
Scripts (and modules) can import modules with the
let import My.Stuff; in outputLn sometext
Module names are one or more unames, separated by periods.
To import the module
My.Stuff, Pinafore will look for a file in these paths in this order:
-I $diron the command line
$pinaforeis the local pinafore directory (typically
A module file looks something like this (see syntax):
let sometext :: Text; sometext = "Hello"; somenumber :: Integer; somenumber = 4; opentype X; closedtype T = T1 Integer Boolean | T2; subtype T <: X; in export sometext somenumber X T T1 T2
export statement exports the given names (values, types, type constructors) that will be available when imported.
Subtype relations are always exported.