pa-ba / compdata

Haskell library implementing "Data Types a la Carte"
http://hackage.haskell.org/package/compdata
Other
89 stars 27 forks source link

Could not deduce (MonadFail m) when compiling with GHC 8.8.3 #29

Closed Soupstraw closed 3 years ago

Soupstraw commented 4 years ago

Full output:

 /tmp/stack14530/compdata-0.12/src/Data/Comp/Thunk.hs:87:28: error:
     * Could not deduce (MonadFail m) arising from a use of `fail'
       from the context: (Monad m, g :<: f)
         bound by the type signature for:
                    whnfPr :: forall (m :: * -> *) (g :: * -> *) (f :: * -> *).
                              (Monad m, g :<: f) =>
                              TermT m f -> m (g (TermT m f))
         at src/Data/Comp/Thunk.hs:83:1-62
       Possible fix:
         add (MonadFail m) to the context of
           the type signature for:
             whnfPr :: forall (m :: * -> *) (g :: * -> *) (f :: * -> *).
                       (Monad m, g :<: f) =>
                       TermT m f -> m (g (TermT m f))
     * In the expression: fail "projection failed"
       In a case alternative: Nothing -> fail "projection failed"
       In a stmt of a 'do' block:
         case proj res of
           Just res' -> return res'
           Nothing -> fail "projection failed"
    |
 87 |                 Nothing -> fail "projection failed"
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^
pniedzielski commented 3 years ago

This issue prevents compdata from being compiled with modern GHCs, and resulted in compdata being removed from stackage (#32). High priority!