git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Create modules.rst
bdf466aPhil Freeman
docs/source/modules.rstnew file+29
@@ -0,0 +1,29 @@
1+## Modules
2+
3+Modules are introduced using the `module` keyword. All code must be placed in a module.
4+
5+Introduce a module as follows, with a list of declarations:
6+
7+```haskell
8+module A where
9+
10+id x = x
11+```
12+
13+Names may be qualified by using a dot:
14+
15+```
16+foo = A.id
17+```
18+
19+All the names in a module can be aliased using the `import` declaration:
20+
21+```haskell
22+import A
23+```
24+
25+You can also limit which names are going to be aliased:
26+
27+```haskell
28+import A (id)
29+```