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

Toplevel ioref #1349

Merged
merged 3 commits into from
Jun 22, 2021
Merged

Toplevel ioref #1349

merged 3 commits into from
Jun 22, 2021

Conversation

brianhuffman
Copy link
Contributor

@brianhuffman brianhuffman commented Jun 22, 2021

Reimplement TopLevel monad using ReaderT (IORef TopLevelRW) IO instead of StateT TopLevelRW IO. This makes it possible to preserve state changes that have been made before an exception is thrown.

Fixes #1341.

@brianhuffman brianhuffman requested a review from atomb June 22, 2021 02:22
Brian Huffman added 2 commits June 21, 2021 19:22
Previously it used `StateT TopLevelRW IO`. This change will make it
possible to preserve state changes that have been made before an
exception is thrown.
Also reimplement the `REPL` monad to adapt to this change. This
makes it so that the `REPL` monad can also preserve state changes
when an exception is thrown in a `TopLevel` action.

Fixes #1341.
Copy link
Contributor

@atomb atomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty reasonable to me.

@brianhuffman brianhuffman merged commit 6f52028 into master Jun 22, 2021
@brianhuffman brianhuffman deleted the toplevel-ioref branch June 22, 2021 20:08
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.

The SAW REPL is not in a useful state after a failure while loading a file
2 participants