wiki:Language/Core/Modules

Modules

Module
 ::= module ModuleName Exports? Imports? with Exp

Exports
 ::= export '{' ExportSig;+ '}'

ExportSig
 ::= value? Name :: Type
  |  type   Name :: Kype

Imports
 ::= import '{' ImportSig;+ '}' 
  |  import foreign abstract type   '{' (Binder : Type)+ '}'
  |  import foreign c        value  '{' (Binder : Type)+ '}'

ImportSig
 ::= value? Name :: Type
  |  type   Name :: Kind

A module definition is a module name, an optional export list, a optional import list, and an expression. In the current implementation the expression must be a letrec.

An exports list is a semi separated list of type and kind signatures. An imports list is similar.

Last modified 3 years ago Last modified on Mar 8, 2014, 6:42:50 AM