You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace outdated references to Pulp with Spago in PSCi Guide (#295)
* Remove outdated references to bower and pulp
* Remove installation of psci-support since resolved in purescript/spago#174
* Replace more references to psci command to 'spago repl' or 'purs repl' depending on context
Co-authored-by: Susan Potter <[email protected]>
Copy file name to clipboardExpand all lines: guides/PSCi.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,23 @@ PSCi "PureScript Interactive" is the REPL for PureScript. It is often a good way
2
2
3
3
## Getting Started
4
4
5
-
Use Pulp to configure and start PSCi:
5
+
Use Spago to configure and start PSCi:
6
6
7
7
```text
8
-
$ npm install -g pulp # Install pulp
8
+
$ npm install -g spago # Install Spago
9
9
10
-
$ cd my-project # Enter an empty folder
10
+
$ cd my-project # Enter an empty folder
11
11
12
-
$ pulp init # Initialize a pulp environment
12
+
$ spago init # Initialize a Spago environment
13
13
14
-
$ pulp repl # Fire up the interpreter psci
14
+
$ spago repl # Fire up the interpreter psci
15
15
16
-
PSCi, version 0.9.1
16
+
...
17
+
PSCi, version 0.13.6
17
18
Type :? for help
18
19
20
+
import Prelude
21
+
19
22
> "hello"
20
23
"hello"
21
24
@@ -24,7 +27,7 @@ Type :? for help
24
27
> 1 + 2 * 3
25
28
7
26
29
27
-
> import Control.Monad.Eff.Console
30
+
> import Effect.Console
28
31
29
32
> log "print this to the screen"
30
33
print this to the screen
@@ -71,24 +74,24 @@ Enter `:paste` (or `:pa`) to enter multi-line (or "paste") mode. Terminate it wi
71
74
## `purescript-psci-support`
72
75
73
76
```text
74
-
$ psci
75
-
76
-
PSCi requires the purescript-psci-support package to be installed.
77
-
You can install it using Bower as follows:
77
+
$ spago repl
78
78
79
-
bower i purescript-psci-support --save-dev
79
+
PSCi requires the `purescript-psci-support` package to be installed.
80
+
You can install it using Spago by adding `"psci-support"` to the list of dependencies in `spago.dhall`.
80
81
81
82
For help getting started, visit http://wiki.purescript.org/PSCi
82
83
```
83
84
84
-
The PureScript compiler suite (i.e. the executable `purs`), unlike most compilers, does not ship with a standard library. In PureScript, even `Prelude` is a normal module, just like any other. Consequentially, `psci` requires a specific library to be installed in order to be able to evaluate terms in the REPL.
85
+
The PureScript compiler suite (i.e. the executable `purs`), unlike most compilers, does not ship with a standard library. In PureScript, even `Prelude` is a normal module, just like any other. Consequentially, `purs repl` requires a specific library to be installed in order to be able to evaluate terms in the REPL.
85
86
86
87
`purescript-psci-support` defines the `Eval` type class for this purpose. Instances of `Eval` are provided for `Show`able types, and for `Eff`, so that we can evaluate actions in the REPL. Library implementors might like to provide `Eval` instances for their own `Eff`-like types.
87
88
88
-
## PSCi Without Pulp
89
+
## PSCi Without Spago
89
90
90
91
PSCi can be run directly, by specifying a list of PureScript source files as globs:
This expects you to have downloaded the PureScript sources for your dependencies (include `psci-support`) under the path `path/to/packages`.
93
96
94
97
Note the single quotes—the purescript compiler itself knows how to expand globs (`*`) and recursive globs (`**`), single quotes prevent your shell from expanding them. (Bash for example doesn’t have recursive globbing enabled by default; don’t forget the single quotes.)
0 commit comments