File tree 3 files changed +10
-10
lines changed 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ exports.setPrompt = function (prompt) {
52
52
} ;
53
53
} ;
54
54
55
- exports . setLineHandler = function ( readline ) {
56
- return function ( callback ) {
55
+ exports . setLineHandler = function ( callback ) {
56
+ return function ( readline ) {
57
57
return function ( ) {
58
58
readline . removeAllListeners ( "line" ) ;
59
59
readline . on ( "line" , function ( line ) {
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ type Completer
65
65
-- | Builds an interface with the specified options.
66
66
createInterface
67
67
:: forall r
68
- . Readable r
68
+ . Readable r
69
69
-> Options InterfaceOptions
70
70
-> Effect Interface
71
71
createInterface input opts = createInterfaceImpl
@@ -110,6 +110,6 @@ type LineHandler a = String -> Effect a
110
110
-- | Set the current line handler function.
111
111
foreign import setLineHandler
112
112
:: forall a
113
- . Interface
114
- -> LineHandler a
113
+ . LineHandler a
114
+ -> Interface
115
115
-> Effect Unit
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ main = do
12
12
interface <- createConsoleInterface noCompletion
13
13
setPrompt " > " interface
14
14
prompt interface
15
- setLineHandler interface $ \s ->
15
+ interface # setLineHandler \s ->
16
16
if s == " quit"
17
- then close interface
18
- else do
19
- log $ " You typed: " <> s
20
- prompt interface
17
+ then close interface
18
+ else do
19
+ log $ " You typed: " <> s
20
+ prompt interface
You can’t perform that action at this time.
0 commit comments