28 | 28 |
To use it, you'll need an implementation of Haskell installed (typically either
|
29 | 29 |
`ghc` or Hugs).
|
30 | 30 |
|
31 | |
First, clone this repository and `cd` into the repo directory.
|
|
31 |
First, clone this repository and `cd` into the repo directory. Then run
|
32 | 32 |
|
33 | |
If you have `cabal` installed you can run
|
|
33 |
make
|
34 | 34 |
|
35 | |
cabal v2-build
|
|
35 |
If you have `cabal` installed, the Makefile will use it to build the `robin`
|
|
36 |
executable, and this will take care of obtaining and building the dependencies.
|
36 | 37 |
|
37 | |
and the executable will be built somewhere under `dist-newstyle`. The driver
|
38 | |
script `bin/robin` will look for it and execute it.
|
|
38 |
If you do not have `cabal`, the Makefile will use `ghc` directly to build the
|
|
39 |
executable, but in this case, you will need to ensure you have dependencies
|
|
40 |
like `parsec` and `random` installed, yourself.
|
39 | 41 |
|
40 | |
If you do not have `cabal`, you can run
|
|
42 |
(If you don't have `ghc` at all, no executable will be built; but that's OK,
|
|
43 |
because in this case the `bin/robin` driver script will fall back to using
|
|
44 |
`runhaskell` or `runhugs` instead.)
|
41 | 45 |
|
42 | |
make exe
|
|
46 |
In any case, the Makefile will also build build the standard library
|
|
47 |
(`pkg/stdlib.robin`). And this same Makefile can be used to build the
|
|
48 |
JavaScript version of the interpreter, with `make web`.
|
43 | 49 |
|
44 | |
to build the reference interpreter. (Note that in this case, you will need
|
45 | |
to ensure you have dependencies like `parsec` and `random` installed, yourself.)
|
46 | |
It will also build the standard library (`pkg/stdlib.robin`). This same
|
47 | |
Makefile can be used to build the JavaScript version of the interpreter, with
|
48 | |
`make web`.
|
49 | |
|
50 | |
If you don't have `ghc` at all, no executable will be built; but that's OK,
|
51 | |
because in this case the `bin/robin` script will fall back to using
|
52 | |
`runhaskell` or `runhugs` instead.
|
53 | |
|
54 | |
After building (if you can), you can run the Robin interpreter using the
|
|
50 |
After running `make`, you can run the Robin interpreter using the
|
55 | 51 |
driver script in `bin`, on one of the example Robin sources in `eg` like so:
|
56 | 52 |
|
57 | 53 |
bin/robin pkg/stdlib.robin eg/hello-world.robin
|