@@ -77,6 +77,8 @@ PureScript can also be seen as a trade-off between a theoretically ideal languag
7777As an introductory example, here is the usual "Hello World" written in PureScript:
7878
7979```haskell
80+module Main where
81+
8082foreign import console :: { log :: String -> {} }
8183
8284main = \ -> console.log "Hello, World!"
@@ -85,9 +87,13 @@ main = \ -> console.log "Hello, World!"
8587which compiles to the following Javascript:
8688
8789```javascript
88−function main() {
89− console.log("Hello, World!");
90−}
90+var Main;
91+(function (Main) {
92+ function main() {
93+ return console.log("Hello, World!");
94+ };
95+ Main.main = main;
96+})(Main = Main || {});
9197```
9298
9399## Another Example
@@ -734,26 +740,14 @@ infixr 7 %%
734740
735741## Modules
736742
737−Simple modules are supported by the `module` keyword.
743+Modules are introduced using the `module` keyword. All code must be placed in a module.
738744
739−Introduce a module as follows, with a list of indented declarations:
745+Introduce a module as follows, with a list of declarations:
740746
741747```haskell
742748module A where
743749
744− foo = \x -> x
745−```
746−
747−Modules may be nested:
748−
749−```haskell
750−module A where
751−
752− foo = \x -> x
753−
754− module B where
755−
756− bar = \y -> y
750+id x = x
757751```
758752
759753Names may be qualified by using a dot: