Gabriella439 / pipes

Compositional pipelines
BSD 3-Clause "New" or "Revised" License
487 stars 72 forks source link

Pipes breaks with ghc-8.8.1 new Monad / MonadFail handling of fail #201

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 pipes with the alpha release of the ghc-8.8.1 and the current version results in the following error:

    [2 of 6] Compiling Pipes.Core       ( src/Pipes/Core.hs, .stack-work/dist/x86_64-linux/Cabal-2.5.0.0/build/Pipes/Core.o )
    [3 of 6] Compiling Pipes            ( src/Pipes.hs, .stack-work/dist/x86_64-linux/Cabal-2.5.0.0/build/Pipes.o )

    /tmp/stack7255/pipes-4.3.9/src/Pipes.hs:426:5: error:
        ‘fail’ is not a (visible) method of class ‘Monad’
        |
    426 |     fail _   = mzero
        |     ^^^^

    /tmp/stack7255/pipes-4.3.9/src/Pipes.hs:427:16: error:
        The INLINE pragma for ‘fail’ lacks an accompanying binding
          (The INLINE pragma must be given where ‘fail’ is declared)
        |
    427 |     {-# INLINE fail #-}
        |                ^^^^

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

recursion-ninja commented 5 years ago

Looking forward to building with the new version.