Skip to content

Remove length parameter to setPrompt #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: purescript-contrib/setup-purescript@main
with:
purescript: "0.14.0-rc3"
purescript: "0.14.0-rc5"

- uses: actions/setup-node@v1
with:
Expand Down
8 changes: 3 additions & 5 deletions src/Node/ReadLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ exports.question = function (text) {
};

exports.setPrompt = function (prompt) {
return function (length) {
return function (readline) {
return function () {
readline.setPrompt(prompt, length);
};
return function (readline) {
return function () {
readline.setPrompt(prompt);
};
};
};
Expand Down
1 change: 0 additions & 1 deletion src/Node/ReadLine.purs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ foreign import question
-- | Set the prompt.
foreign import setPrompt
:: String
-> Int
-> Interface
-> Effect Unit

Expand Down
2 changes: 1 addition & 1 deletion test/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Node.ReadLine (prompt, close, setLineHandler, setPrompt, noCompletion, c
main :: Effect Unit
main = do
interface <- createConsoleInterface noCompletion
setPrompt "> " 2 interface
setPrompt "> " interface
prompt interface
setLineHandler interface $ \s ->
if s == "quit"
Expand Down