yesodweb / shakespeare

Haml-like template files that are compile-time checked
http://www.yesodweb.com/book/shakespearean-templates
MIT License
136 stars 76 forks source link

cannot compile with ghc-8.8 because of MonadFail #239

Closed jwaldmann closed 5 years ago

jwaldmann commented 5 years ago
   • Could not deduce (MonadFail m) arising from a use of ‘fail’
      from the context: Monad m
        bound by the type signature for:
                   getVars :: forall (m :: * -> *).
                              Monad m =>
                              [(String, String)] -> Content -> m [(Deref, VarType)]
        at Text/Internal/Css.hs:292:1-75
      Possible fix:
        add (MonadFail m) to the context of
          the type signature for:

but when I do this, I get

    • No instance for (MonadFail Data.Functor.Identity.Identity)
        arising from a use of ‘getVars’
    • In the first argument of ‘mapM’, namely ‘(getVars scope0)’
      In the second argument of ‘($)’, namely
        ‘mapM (getVars scope0) contents’
      In the second argument of ‘($)’, namely
        ‘runIdentity $ mapM (getVars scope0) contents’
    |
126 |     concat $ runIdentity $ mapM (getVars scope0) contents
    |                                  ^^^^^^^^^^^^^^
snoyberg commented 5 years ago

What version of aeson did you use for testing this?

jwaldmann commented 5 years ago
- aeson-1.4.4.0@sha256:c70d78f78efb1d766f1c5b594c9eadcc1bc9587d83e5a50714b9a91105fb2ca4,6963

cf. https://gitlab.imn.htwk-leipzig.de/waldmann/pure-matchbox/blob/183-compile-with-ghc-8-8/stack.yaml

snoyberg commented 5 years ago

I've pushed a commit which should fix this.

jwaldmann commented 5 years ago

Thanks!