Skip to content

Fix to work with MonadFail proposal#14

Open
msakai wants to merge 1 commit intoacfoltzer:masterfrom
msakai:feature/monad-fail-proposal
Open

Fix to work with MonadFail proposal#14
msakai wants to merge 1 commit intoacfoltzer:masterfrom
msakai:feature/monad-fail-proposal

Conversation

@msakai
Copy link
Copy Markdown

@msakai msakai commented Jan 26, 2025

Because of the MonadFail Proposal, fail is moved from Monad to MonadFail. As the Get monad is not an instance of MonadFail, we cannot use fail from GHC 8.8.1 or (base 4.13.0.0).

This PR fixes the issue by replacing fail with error.

The default implementation of fail which was used by Get monad was errorWithoutStackTrace, but I choose error for simplicity.

fixes #12

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.

nbt-0.7 is not compiling (use of 'fail' in Data/NBT.hs)

1 participant