Compiler: Fails to compile with GHC 8.0.2 / LTS 8.1

Created on 19 Feb 2017  Â·  10Comments  Â·  Source: elm/compiler

I haven't dug into why, but here's the error:

src/Parse/Helpers.hs:61:13: error:
    • Couldn't match type ‘[Char]’
                     with ‘transformers-0.5.2.0:Control.Monad.Trans.Reader.ReaderT
                             Text.Parsec.Indent.Pos
                             Data.Functor.Identity.Identity
                             (SourceM (Either ParseError a) -> Either ParseError a)’
      Expected type: Text.Parsec.Indent.IndentT
                       Data.Functor.Identity.Identity
                       (SourceM (Either ParseError a) -> Either ParseError a)
        Actual type: SourceName
    • In the first argument of ‘runIndent’, namely ‘sourceName’
      In the expression: runIndent sourceName
      In the expression:
        runIndent sourceName $ runParserT aParser table sourceName input
    • Relevant bindings include
        aParser :: IParser a (bound at src/Parse/Helpers.hs:60:34)
        iParseWithTable :: SourceName
                           -> OpTable -> IParser a -> String -> Either ParseError a
          (bound at src/Parse/Helpers.hs:60:1)

src/Parse/Helpers.hs:215:9: error:
    • Couldn't match type ‘transformers-0.5.2.0:Control.Monad.Trans.Reader.ReaderT
                             Text.Parsec.Indent.Pos m0’
                     with ‘transformers-0.5.2.0:Control.Monad.Trans.State.Lazy.StateT
                             SourcePos Data.Functor.Identity.Identity’
      Expected type: ParsecT String OpTable SourceM ()
        Actual type: Text.Parsec.Indent.IndentParserT
                       String OpTable m0 ()
    • In a stmt of a 'do' block: indented
      In the expression:
        do { n <- whitespace;
             constraint n <?> Syntax.whitespace;
             indented }
      In an equation for ‘spacing’:
          spacing
            = do { n <- whitespace;
                   constraint n <?> Syntax.whitespace;
                   indented }

Most helpful comment

For the record, it's indents package bump to 4.0.0

All 10 comments

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

It's not expected to compile with anything beyond GHC 7.10, see https://github.com/elm-lang/elm-platform/blob/master/installers/BuildFromSource.hs

So this is not a bug report, or unexpected. Elm will start to compile with GHC 8 when Evan decides to switch to that compiler on his development machine. Until then, having this issue here open serves no purpose.

I don't think it's an issue because of GHC 8, but rather the newest version of some package.

That's well possible. Who knows. But it doesn't make a difference. See https://github.com/elm-lang/elm-compiler/pull/1431 and https://github.com/elm-lang/elm-compiler/pull/1479 and https://github.com/elm-lang/elm-compiler/pull/1488 for a similar story. Unless you can say exactly what the offending package is, and why a newer version should be preferred, and how to accomplish that, your issue will be closed. So I suggest you close it yourself, to save Evan the work.

So Evan doesn't care if the software can't be used on the latest stable compiler even if a patch is provided?

I can't answer that question. I only pointed you to information that seems relevant to this issue being open.

For the record, it's indents package bump to 4.0.0

I will upgrade to a later version of GHC at some point, but it is not a super high priority in the grand scheme of things since getting it installed on Windows, Linux, and Mac to make binaries seems to be quite an ordeal.

That said, maybe there is still something to do in the meantime. I'm not sure what the action item is though, so open a new issue with a specific title and description that suggests a concrete change if that is what you are looking for.

@domenkozar what is the patch? I am having the same issue on upgrading the https://github.com/h4ck3rm1k3/haskelm to the latest version of haskell.

@h4ck3rm1k3 the commit in https://github.com/NixOS/nixpkgs/issues/22932 is https://github.com/NixOS/nixpkgs/commit/afb7d04dd6c08e86bff7fca44d4a4832a29c47bc. It just pins some dependencies at earlier versions -- it doesn't actually make changes to the elm source code to be compatible with the latest versions.

Was this page helpful?
0 / 5 - 0 ratings