git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #425 from epost/master

Moved 'Installation' sections to their own 'Getting Started' chapter, an...

commit00597b71b0e9fbfcdbf78e9995bec406baa9a77a authorPhil Freeman <paf31@cantab.net> dateWed 28 May 2014, 14:10 (12 years ago) parentb23e4ef3117bdc
3 files changed+64−37
docs/source/index.rst+1 docs/source/intro.rst−37 docs/source/start.rst+63
docs/source/index.rst+1
@@ -12,6 +12,7 @@ Contents:
1212 :maxdepth: 2
1313
1414 intro
15+ start
1516 types
1617 kinds
1718 syntax
docs/source/intro.rst−37
@@ -17,43 +17,6 @@ PureScript is a small strongly, statically typed compile-to-JS language with a n
1717- Tail-call elimination
1818- Type Classes
1919
20−Installation
21−------------
22−
23−If you have the Haskell Plaform installed, then you can install the latest released version from Hackage::
24−
25− cabal update
26− cabal install purescript
27−
28−If you would like to build the latest version of the code, clone this repository and build::
29−
30− git clone git://github.com:paf31/purescript.git
31− cabal configure --enable-tests
32− cabal build
33− cabal test
34− cabal install
35−
36−Usage
37−-----
38−
39−The `psc` executable takes a list of PureScript source files as arguments and by default writes out its errors or output to the console.
40−
41−The following options are supported:
42−
43−--stdin Read input from standard input instead of from files
44−--output Write the generated Javascript to the specified file
45−--externs Write a list of foreign imports declarations to the specified file in addition to generating Javascript output
46−--runtime-type-checks Generate simple runtime type checks for function arguments with simple types.
47−--no-tco Turn off tail-call elimination.
48−--no-prelude Do not include the Prelude in the generated Javascript.
49−--no-magic-do Turn off optimizations which inline calls to ``>>=`` for the ``Eff`` monad.
50−--no-opts Disable all optimizations.
51−--main Generate a call to ``main`` in the specified module after all other generated Javascript. Defaults to ``Main`` if the option is used but no value is provided.
52−--module If specified, any code which is not referenced transitively from this module will be removed. This argument can be used multiple times.
53−--codegen A list of modules for which Javascript and externs should be generated. This argument can be used multiple times.
54−--browser-namespace Specify the namespace that PureScript modules will be exported to when running in the browser.
55−--verbose-errors Generate verbose error messages
56−
5720Motivation
5821----------
5922
docs/source/start.rstnew file+63
@@ -0,0 +1,63 @@
1+Getting Started
2+===============
3+
4+Compiler Installation
5+---------------------
6+
7+If you have the Haskell Plaform installed, then you can install the latest released version from Hackage::
8+
9+ cabal update
10+ cabal install purescript
11+
12+If you would like to build the latest version of the code, clone this repository and build::
13+
14+ git clone git://github.com:paf31/purescript.git
15+ cabal configure --enable-tests
16+ cabal build
17+ cabal test
18+ cabal install
19+
20+Alternatively, consider installing PureScript in a Cabal sandbox using ``cabal sandbox init``.
21+
22+Creating a new PureScript project
23+---------------------------------
24+
25+You can create a new PureScript project using ``grunt-init`` and [this PureScript project template](https://github.com/purescript-contrib/grunt-init-purescript). This will give you a project that uses [Grunt](http://gruntjs.com) as its build tool and [Bower](http://bower.io) for dependency management. See the [README](https://github.com/purescript-contrib/grunt-init-purescript) for step-by-step instructions.
26+
27+Compiler usage
28+--------------
29+
30+The `psc` executable takes a list of PureScript source files as arguments and by default writes out its errors or output to the console.
31+
32+The following options are supported:
33+
34+--stdin Read input from standard input instead of from files.
35+--output Write the generated Javascript to the specified file.
36+--externs Write a list of foreign imports declarations to the specified file in addition to generating Javascript output.
37+--runtime-type-checks Generate simple runtime type checks for function arguments with simple types.
38+--no-tco Turn off tail-call elimination.
39+--no-prelude Do not include the Prelude in the generated Javascript.
40+--no-magic-do Turn off optimizations which inline calls to ``>>=`` for the ``Eff`` monad.
41+--no-opts Disable all optimizations.
42+--main Generate a call to ``main`` in the specified module after all other generated Javascript. Defaults to ``Main`` if the option is used but no value is provided.
43+--module If specified, any code which is not referenced transitively from this module will be removed. This argument can be used multiple times.
44+--codegen A list of modules for which Javascript and externs should be generated. This argument can be used multiple times.
45+--browser-namespace Specify the namespace that PureScript modules will be exported to when running in the browser.
46+--verbose-errors Generate verbose error messages.
47+
48+psc-make
49+--------
50+
51+The ``psc-make`` executable makes CommonJS modules and supports incremental compilation. Unlike ``psc``, it does not do dead code elimination.
52+
53+The following command line options are supported:
54+
55+--output=VAL The output directory. Default: ``output``.
56+--runtime-type-checks Generate runtime type checks
57+--verbose-errors Display verbose error messages.
58+--help=FMT Show this help in format FMT (``pager, ``plain``, or ``groff``). Default: ``pager``.
59+--no-magic-do Disable the optimization that overloads the ``do`` keyword to generate efficient code specifically for the ``Eff`` monad.
60+--no-opts Skip the optimization phase.
61+--no-prelude Omit the Prelude.
62+--no-prelude Omit the Prelude.
63+--no-tco Disable tail call optimizations