git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Update intro.rst
commit56cf09afb03a0ddb090e9ed84fb1a1e21b25a29a authorPhil Freeman <paf31@cantab.net> dateWed 22 Jan 2014, 22:42 (13 years ago) parent19064bd
1 file changed+16−10
docs/source/intro.rst+16−10
docs/source/intro.rst+16−10
@@ -18,15 +18,21 @@ PureScript is a small strongly, statically typed compile-to-JS language with a n
1818- Optional tail-call elimination
1919- Type Classes
2020
21−Try It!
22−-------
23−
24−Try PureScript in the browser [here](http://tryps.functorial.com/).
25−
2621Installation
2722------------
2823
29−Install the Haskell Plaform, then `cabal install`
24+If you have the Haskell Plaform installed, then you can install the latest released version from Hackage::
25+
26+ cabal update
27+ cabal install purescript
28+
29+If you would like to build the latest version of the code, clone this repository and build:
30+
31+ git clone git://github.com:paf31/purescript.git
32+ cabal configure --enable-tests
33+ cabal build
34+ cabal test
35+ cabal install
3036
3137Usage
3238-----
@@ -35,9 +41,9 @@ The `psc` executable takes a list of PureScript source files as arguments and by
3541
3642The following options are supported:
3743
38−-s --stdin Read input from standard input instead of from files
39−-o --output Write the generated Javascript to the specified file
40−-e --foreign imports Write a list of foreign imports declarations to the specified file in addition to generating Javascript output
44+--stdin Read input from standard input instead of from files
45+--output Write the generated Javascript to the specified file
46+--externs Write a list of foreign imports declarations to the specified file in addition to generating Javascript output
4147--runtime-type-checks Generate simple runtime type checks for function arguments with simple types.
4248--tco Perform tail-call elimination on the generated Javascript.
4349--no-prelude Do not include the Prelude in the generated Javascript.
@@ -99,7 +105,7 @@ The following code defines a `Person` data type and a function to generate a str
99105Line by line, this reads as follows:
100106
101107- `Person` is a data type with one constructor, also called `Person`
102− - The `Person` constructor takes an object with two properties, `name` which is a `String`, and `age` which is a `Number`
108+- The `Person` constructor takes an object with two properties, `name` which is a `String`, and `age` which is a `Number`
103109- The `numberToString` function is written in Javascript, and converts a `Number` to its `String` representation
104110- The `showPerson` function takes a `Person` and returns a `String`
105111- `showPerson` works by case analysis on its argument, first matching the constructor `Person` and then using string concatenation and object accessors to return its result.