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

binary bits doesn't compile on ghc 8.8.1 or later #14

Open
GeorgeCo opened this issue Jan 25, 2020 · 2 comments
Open

binary bits doesn't compile on ghc 8.8.1 or later #14

GeorgeCo opened this issue Jan 25, 2020 · 2 comments

Comments

@GeorgeCo
Copy link

binary bits doesn't compile on ghc 8.8.1 or later:

cabal v1-install binary-bits
Resolving dependencies...
Starting binary-bits-0.5
Building binary-bits-0.5
Failed to install binary-bits-0.5
Build log ( /Users/gcolpitts/.cabal/logs/ghc-8.10.0.20200123/binary-bits-0.5-KnF4JnKbFevEcApL2wyqoN.log ):
cabal: Entering directory '/var/folders/df/5d_dsdrx1dn4j30ktsgn8blh0000gp/T/cabal-tmp-94697/binary-bits-0.5'
Configuring binary-bits-0.5...
Preprocessing library for binary-bits-0.5..
Building library for binary-bits-0.5..
[1 of 3] Compiling Data.Binary.Bits.Get ( Data/Binary/Bits/Get.hs, dist/build/Data/Binary/Bits/Get.o, dist/build/Data/Binary/Bits/Get.dyn_o )

Data/Binary/Bits/Get.hs:345:3: error:
‘fail’ is not a (visible) method of class ‘Monad’
|
345 | fail str = B $ (S inp n) -> putBackState inp n >> fail str
| ^^^^
cabal: Leaving directory '/var/folders/df/5d_dsdrx1dn4j30ktsgn8blh0000gp/T/cabal-tmp-94697/binary-bits-0.5'
cabal: Error: some packages failed to install:
binary-bits-0.5-KnF4JnKbFevEcApL2wyqoN failed during the building phase. The
exception was:
ExitFailure 1

This error is expected with 8.8.1 or later. From https://gitlab.haskell.org/ghc/ghc/wikis/migration/8.8 :

GHC 8.8 implements the final phase of the MonadFail proposal and now does the following:

The fail method of Monad has been removed in favor of the method of the same name in the MonadFail class.

MonadFail(..) is now exported from the Prelude and Control.Monad modules.

The MonadFailDesugaring language extension is now deprecated, as its effects are always enabled.

Also see https://gitlab.haskell.org/ghc/ghc/wikis/proposal/monad-fail#adapting-old-code

@tfausak
Copy link

tfausak commented Feb 17, 2020

See #13.

@GeorgeCo
Copy link
Author

same error on 8.10.1

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

No branches or pull requests

2 participants