spl / dlist

Difference lists in Haskell
https://hackage.haskell.org/package/dlist
BSD 3-Clause "New" or "Revised" License
65 stars 15 forks source link

Breaks with GHC-8.8.1 new Monad / MonadFail handling of fail #34

Closed recursion-ninja closed 5 years ago

recursion-ninja commented 5 years ago

The new Monad instance does not have the method fail. That has been moved exclusively to MonadFail in ghc-8.8.1.

I tried building dlist with the alpha release of the ghc-8.8.1 and the current version results in the following error:

    Configuring microlens-0.4.10...
    Preprocessing library for microlens-0.4.10..
    Building library for microlens-0.4.10..
    [1 of 4] Compiling Lens.Micro.Type  ( src/Lens/Micro/Type.hs, .stack-work/dist/x86_64-linux/Cabal-2.5.0.0/build/Lens/Micro/Type.o )
    [2 of 4] Compiling Lens.Micro.Internal ( src/Lens/Micro/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-2.5.0.0/build/Lens/Micro/Internal.o )
    [3 of 4] Compiling Lens.Micro       ( src/Lens/Micro.hs, .stack-work/dist/x86_64-linux/Cabal-2.5.0.0/build/Lens/Micro.o )

    /tmp/stack7255/microlens-0.4.10/src/Lens/Micro.hs:1416:5: error:
        ‘fail’ is not a (visible) method of class ‘Monad’
         |
    1416 |     fail str = StateT $ \ _ -> fail str
         |     ^^^^

    /tmp/stack7255/microlens-0.4.10/src/Lens/Micro.hs:1417:16: error:
        The INLINE pragma for ‘fail’ lacks an accompanying binding
          (The INLINE pragma must be given where ‘fail’ is declared)
         |
    1417 |     {-# INLINE fail #-}
         | 

It should be simple enough to fix with some use of the C pre-processor.

spl commented 5 years ago

Thanks for the report. Did you build dlist from the repository or Hackage? This should've been fixed in the repository by #32, but I haven't made a release, yet.

spl commented 5 years ago

Also, your build log doesn't mention dlist anywhere. Copy-paste error?

spl commented 5 years ago

Since you also posted https://github.com/nick8325/quickcheck/issues/261, in case you're curious, QuickCheck breaking for GHC 8.8.1 is the reason I haven't released a new dlist.

asr commented 5 years ago

BTW, I couldn't install QuickCheck with GHC 8.8.1-alpha2 because splitmix doesn't support GHC 8.8.1 (see https://github.com/phadej/splitmix/pull/15).

Blocking https://github.com/agda/agda/issues/3725.

recursion-ninja commented 5 years ago

I built with a newer version of dlist from this repository and it built successfully with 8.8.1

GeorgeCo commented 5 years ago

Would it be possible to do a release?

ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.0.20190721
 cabal install dlist --allow-new
...
[1 of 1] Compiling Data.DList       ( Data/DList.hs, dist/build/Data/DList.o )

Data/DList.hs:281:3: error:
    ‘fail’ is not a (visible) method of class ‘Monad’
    |
281 |   fail _   = empty
    |   ^^^^

Data/DList.hs:282:14: error:
    The INLINE pragma for ‘fail’ lacks an accompanying binding
      (The INLINE pragma must be given where ‘fail’ is declared)
    |
282 |   {-# INLINE fail #-}
    |              ^^^^
phadej commented 5 years ago

splitmix and QuickCheck have now build plans with GHC-8.8.1

spl commented 5 years ago

Would it be possible to do a release?

Done: dlist-0.8.0.7.

Thanks for everyone's updates and patience. I was unavailable for a few weeks.

phadej commented 5 years ago

Thanks!

On 5 Aug 2019, at 14.48, Sean Leather notifications@github.com wrote:

Would it be possible to do a release?

Done: dlist-0.8.0.7.

Thanks for everyone's updates and patience. I was unavailable for a few weeks.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.