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

FLG doesn't build with MonadFailDesugaring #79

Closed
recursion-ninja opened this issue Aug 13, 2018 · 4 comments · Fixed by #80
Closed

FLG doesn't build with MonadFailDesugaring #79

recursion-ninja opened this issue Aug 13, 2018 · 4 comments · Fixed by #80

Comments

@recursion-ninja
Copy link
Contributor

recursion-ninja commented Aug 13, 2018

GHC 8.6.1-beta1 enables the MonadFailDesugaring language extension by default as part of the migration plan for the MonadFail proposal. Currently fgl doesn't build with this new extension enabled:

        • 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

Ideally this would get fixed before the upcoming GHC 8.6.1 release.

@ivan-m
Copy link
Contributor

ivan-m commented Aug 14, 2018

I do not have any easy way to test using the beta version at the moment so I will not be able to test this out myself any time soon.

@recursion-ninja
Copy link
Contributor Author

@ivan-m Would you like me to try and create a pull request to resolve the issue?

@ivan-m
Copy link
Contributor

ivan-m commented Aug 18, 2018

That would be great, thanks!

@recursion-ninja
Copy link
Contributor Author

Sunday is the earliest I can invest some time in this. More likely later this coming week. I'll keep you posted.

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

Successfully merging a pull request may close this issue.

2 participants