elm-lang / elm-package

Command line tool to share Elm libraries
BSD 3-Clause "New" or "Revised" License
214 stars 66 forks source link

0.5.1 is incompatible with ghc 7.10.2 #147

Closed Magicloud closed 9 years ago

Magicloud commented 9 years ago
src/Docs.hs:21:5:
    Non type-variable argument
      in the constraint: Control.Monad.Error.Class.MonadError [Char] m
    (Use FlexibleContexts to permit this)
    When checking that ‘badJson’ has the inferred type
      badJson :: forall (m :: * -> *) a.
                 Control.Monad.Error.Class.MonadError [Char] m =>
                 [Char] -> m a
    In an equation for ‘generate’:
        generate
          = do { Cmd.run "elm-make" ["--docs=" ++ Path.documentation];
                 json <- liftIO (BS.readFile Path.documentation);
                 either badJson return (Json.eitherDecode json) }
          where
              badJson msg
                = throwError $ "Problem with generated documentation:\n" ++ msg```
jvoigtlaender commented 9 years ago

It's not really incompatible. It just needs the FlexibleContexts language pragma. This is addressed in the build script linked at https://github.com/elm-lang/elm-platform by this line.

And looking beyond 0.5.1, the matter is fixed by this commit: https://github.com/elm-lang/elm-package/commit/af517f2ffe15f8ec1d8c38f01ce188bbdefea47a.

So, the issue here can be immediately closed.

Magicloud commented 9 years ago

Ah, did not read through the building script.