@@ -95,23 +95,27 @@ As an introductory example, here is the usual "Hello World" written in PureScrip
96module Main where
96module Main where
98−foreign import console :: { log :: String -> {} }
98+import Trace
100−main = \ -> console.log "Hello, World!"
100+main = trace "Hello, World!"
103−which compiles to the following Javascript:
103+which compiles to the following Javascript, ignoring the Prelude:
105```javascript
105```javascript
106−var Main;
106+var Main;
107(function (Main) {
107(function (Main) {
109− return console.log("Hello, World!");
108+ var main = trace("Hello, World!");
111− Main.main = main;
109+ Main.main = main;
112})(Main = Main || {});
110})(Main = Main || {});
113+The following command will compile and execute the PureScript code above:
116+psc input.purs --run-main | nodejs
115## Another Example
119## Another Example
117The following code defines a `Person` data type and a function to generate a string representation for a `Person`:
121The following code defines a `Person` data type and a function to generate a string representation for a `Person`: