Skip to content
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

Add multi-line input support #26

Merged
merged 4 commits into from
Jun 16, 2020
Merged

Add multi-line input support #26

merged 4 commits into from
Jun 16, 2020

Conversation

basile-henry
Copy link
Contributor

The way this multi-line input works is very much inspired by the PureScript REPL which also uses haskeline:
purescript/purescript#934 (comment)

The name of the command is configurable, so it could be called m, paste, multiline, or whatever works best for the application using this.

The banner can now take into account if it's in the middle of a multi-line input or not.

This PR might make #25 redundant.

@sdiehl sdiehl mentioned this pull request Jun 15, 2020
@sdiehl
Copy link
Owner

sdiehl commented Jun 15, 2020

This is cool, however might break quite a few downstream libraries that use evalRepl. I'm just going to look into what the damage would be before I merge this PR into 0.4.

@sdiehl sdiehl changed the base branch from master to 0.4 June 15, 2020 23:00
@sdiehl
Copy link
Owner

sdiehl commented Jun 16, 2020

This should be fine, it just adds another argument to runRepl. Just need to merge the multi-line logic with the finaliser logic and then it should be good.

@basile-henry
Copy link
Contributor Author

Great! :) I'll rebase it on the latest master!

@basile-henry
Copy link
Contributor Author

I meant 0.4 branch! 😅

The way this multi-line input works is very much inspired by the
PureScript REPL which also uses `haskeline`: purescript/purescript#934 (comment)

The name of the command is configurable, so it could be called `m`,
`paste`, `multiline`, or whatever works best for the application using
this.

The banner can now take into account if it's in the middle of a
multi-line input or not.
@sdiehl sdiehl merged commit 2182298 into sdiehl:0.4 Jun 16, 2020
@basile-henry basile-henry deleted the multi-line branch June 16, 2020 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants