@@ -77,6 +77,8 @@ PureScript can also be seen as a trade-off between a theoretically ideal languag
77As an introductory example, here is the usual "Hello World" written in PureScript:
77As an introductory example, here is the usual "Hello World" written in PureScript:
80foreign import console :: { log :: String -> {} }
82foreign import console :: { log :: String -> {} }
82main = \ -> console.log "Hello, World!"
84main = \ -> console.log "Hello, World!"
@@ -85,9 +87,13 @@ main = \ -> console.log "Hello, World!"
85which compiles to the following Javascript:
87which compiles to the following Javascript:
87```javascript
89```javascript
88−function main() {
92+ function main() {
89− console.log("Hello, World!");
93+ return console.log("Hello, World!");
96+})(Main = Main || {});
93## Another Example
99## Another Example
@@ -734,26 +740,14 @@ infixr 7 %%
735## Modules
741## Modules
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.
739−Introduce a module as follows, with a list of indented declarations:
745+Introduce a module as follows, with a list of declarations:
741```haskell
747```haskell
742module A where
748module A where
744− foo = \x -> x
750+id x = x
747−Modules may be nested:
759Names may be qualified by using a dot:
753Names may be qualified by using a dot: