Skip to content

Commit 479edea

Browse files
kikapaf31
authored andcommitted
Purescript 0.9.1 update (#8)
* Purescript 0.9.1 update * bower.json update for `purescript-node-process` v1.0.0.
1 parent f215e06 commit 479edea

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

bower.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
"package.json"
2222
],
2323
"dependencies": {
24-
"purescript-console": "^0.1.0",
25-
"purescript-node-streams": "~0.4.0",
26-
"purescript-node-process": "~0.5.0",
27-
"purescript-options": "^0.6.0",
28-
"purescript-foreign": "^0.7.2"
24+
"purescript-console": "^1.0.0",
25+
"purescript-node-streams": "^1.0.0",
26+
"purescript-node-process": "^1.0.0",
27+
"purescript-options": "^1.0.0",
28+
"purescript-foreign": "^1.0.0"
2929
}
3030
}

src/Node/ReadLine.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module Node.ReadLine
1919
, close
2020
) where
2121

22-
import Prelude (Unit, return, (<>), ($))
22+
import Prelude
2323
import Control.Monad.Eff (Eff)
2424
import Control.Monad.Eff.Console (CONSOLE)
2525
import Control.Monad.Eff.Exception (EXCEPTION)
@@ -94,7 +94,7 @@ createConsoleInterface compl = createInterface stdin $ output := stdout
9494

9595
-- | A completion function which offers no completions.
9696
noCompletion :: forall eff. Completer eff
97-
noCompletion s = return { completions: [], matched: s }
97+
noCompletion s = pure { completions: [], matched: s }
9898

9999
-- | Prompt the user for input on the specified `Interface`.
100100
foreign import prompt :: forall eff.

test/Main.purs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
module Test.Main where
22

33
import Prelude
4-
import Control.Monad.Eff.Console
5-
import Node.ReadLine
4+
import Control.Monad.Eff (Eff)
5+
import Control.Monad.Eff.Console (CONSOLE, log)
6+
import Control.Monad.Eff.Exception (EXCEPTION)
7+
import Node.ReadLine (READLINE, prompt, close, setLineHandler, setPrompt,
8+
noCompletion, createConsoleInterface)
69

10+
main::forall e.
11+
Eff (readline::READLINE, console::CONSOLE, err :: EXCEPTION | e) Unit
712
main = do
813
interface <- createConsoleInterface noCompletion
914

@@ -13,5 +18,5 @@ main = do
1318
if s == "quit"
1419
then close interface
1520
else do
16-
log $ "You typed: " ++ s
21+
log $ "You typed: " <> s
1722
prompt interface

0 commit comments

Comments
 (0)