git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Hello World sample
dfb07d2Phil Freeman
README.md+19−1
@@ -60,7 +60,25 @@ PureScript is *not* designed to be a general-purpose programming language. The p
60
60
61PureScript can also be seen as a trade-off between a theoretically ideal language and one which generates reasonably high performance code.
61PureScript can also be seen as a trade-off between a theoretically ideal language and one which generates reasonably high performance code.
62
62
63+## Hello, PureScript!
64+
65+As an introductory example, here is the usual "Hello World" written in PureScript:
66+
67+```haskell
68+foreign import console :: { log :: String -> {} }
69+
70+main = \() -> console.log "Hello, World!"
71+```
72+
73+which compiles to the following Javascript:
74+
75+```javascript
76+function main() {
77+ console.log("Hello, World!");
78+}
79+```
80+
63−## First Example
81+## Another Example
64
82
65The following code defines a `Person` data type and a function to generate a string representation for a `Person`:
83The following code defines a `Person` data type and a function to generate a string representation for a `Person`:
66
84