haskell / fgl

A Functional Graph Library for Haskell
http://hackage.haskell.org/package/fgl
Other
184 stars 54 forks source link

fgl-5.6.0.0 fails with ghc-8.6.1 #81

Closed juhp closed 5 years ago

juhp commented 5 years ago

Just a heads-up that fgl fails to build with ghc-8.6.1:

Data/Graph/Inductive/Monad.hs:59:36: error:
    • Could not deduce (Control.Monad.Fail.MonadFail m)
        arising from a do statement
        with the failable pattern ‘(Just c, g')’
      from the context: GraphM m gr
        bound by the class declaration for ‘GraphM’
        at Data/Graph/Inductive/Monad.hs:42:20-25
      Possible fix:
        add (Control.Monad.Fail.MonadFail m) to the context of
          the type signature for:
            matchAnyM :: forall a b. m (gr a b) -> m (GDecomp gr a b)
          or the class declaration for ‘GraphM’
    • In a stmt of a 'do' block: (Just c, g') <- matchM v g
      In the expression:
        do (Just c, g') <- matchM v g
           return (c, g')
      In a case alternative:
          (v, _) : _
            -> do (Just c, g') <- matchM v g
                  return (c, g')
   |
59 |                      (v,_):_ -> do (Just c,g') <- matchM v g
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^
peti commented 5 years ago

We've run into the same problem both in NixOS and in openSUSE. A fix would be very much appreciated.

peti commented 5 years ago

I believe that https://github.com/haskell/fgl/pull/80 would fix this issue.

phadej commented 5 years ago

I made revisions. Unfortunately there doesn't seem to be a GHC-8.6 compatible release atm.

https://matrix.hackage.haskell.org/package/fgl is green however (but only dark green for 8.6.1)

recursion-ninja commented 5 years ago

@peti #80 is intended to fix this issue. There one last decision to be made as to how to resolve the MonadFail constraint requirement on the GraphM typeclass. I'm hoping that #80 is ready to be merged and the new version can be uploaded to hackage very soon.

peti commented 5 years ago

I see #80 has been merged a few days ago. Is there going to be a new release?

ivan-m commented 5 years ago

Travis-CI builds are currently failing; once they work I'll release.

juhp commented 5 years ago

Looks good with #83 :-)

phadej commented 5 years ago

Or #84

phadej commented 5 years ago

ping @ivan-m

ivan-m commented 5 years ago

Done. Apologies for the delay.