Version 2 (modified by benl, 5 years ago)

--

Modules

Modules start with an optional module identifier, followed by a list of export and import declarations. Export declarations must come before import declarations.


module

= module moduleId where moduleBody
| moduleBody


moduleBody

= { {exportDecl;}* {importDecl;}* {topDecl;}+ }


exportDecl

= export var
| export type con


importDecl

= import moduleId
| import { {moduleId}+ }