git.iko.soy/rowtype-yoga/purescript-native
on e24efbc help sign in
29 lines 603 B history raw
1Modules
2=======
4All code in PureScript is contained in a module. Modules are introduced using the ``module`` keyword::
6 module A where
7
8 id x = x
10When referencing values or data types in another module, names may be qualified by using a dot::
12 module B where
14 foo = A.id
16Importing Modules
17-----------------
19A module can be imported using the ``import`` keyword. This will create aliases for all of the values and types in the imported module::
21 module B where
23 import A
25Alternatively, a list of names to import can be provided in parentheses::
27 module B where
29 import A (id)