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

Fix IM's MonadError instance #4827

Merged
merged 3 commits into from Aug 7, 2020
Merged

Fix IM's MonadError instance #4827

merged 3 commits into from Aug 7, 2020

Conversation

zliu41
Copy link
Contributor

@zliu41 zliu41 commented Aug 1, 2020

Currently catchError calls runIM, then lifts the result back into IM. This means runInputT is called in every interaction loop (i.e., after every command). As a result, accessing the history of commands using up/down arrows doesn't work, among possibly other problems.

A correct way to implement catchError is to use InputT's MonadException (0.7) or MonadCatch (0.8) instance. Now runInputT is called once per interactive session, and history works.

@gallais gallais merged commit e4842b2 into agda:master Aug 7, 2020
@gallais
Copy link
Member

gallais commented Aug 7, 2020

Thanks!

@zliu41 zliu41 deleted the im/monaderror branch August 7, 2020 14:05
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.

None yet

2 participants