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

Unable to build on GHC 7.10.1 #58

Open
DawidLoubser opened this issue Jun 5, 2015 · 3 comments
Open

Unable to build on GHC 7.10.1 #58

DawidLoubser opened this issue Jun 5, 2015 · 3 comments

Comments

@DawidLoubser
Copy link

Hi all,

First of all, since this project has been 'abandoned' - in which future direction should be we contributing our efforts, especially to support Eclipse FP (one of the most useful Haskell coding environments around)?

Secondly, I am not able to build the current version from source on GHC 7.10.1, this is my output:
(Note: I am building in a sandbox, and I have first pre-built ghc-pkg-lib from source)

Is this because of the breaking changes introduced in GHC 7.10?

Configuring buildwrapper-0.9.2...
Building buildwrapper-0.9.2...
Preprocessing library buildwrapper-0.9.2...
[1 of 6] Compiling Language.Haskell.BuildWrapper.Base ( src/Language/Haskell/BuildWrapper/Base.hs, dist/dist-sandbox-80d764cb/build/Language/Haskell/BuildWrapper/Base.o )

src/Language/Haskell/BuildWrapper/Base.hs:13:1: Warning:
    The import of ‘Control.Applicative’ is redundant
      except perhaps to import instances from ‘Control.Applicative’
    To import instances alone, use: import Control.Applicative()
[2 of 6] Compiling Language.Haskell.BuildWrapper.Cabal ( src/Language/Haskell/BuildWrapper/Cabal.hs, dist/dist-sandbox-80d764cb/build/Language/Haskell/BuildWrapper/Cabal.o )
[3 of 6] Compiling Language.Haskell.BuildWrapper.GHCStorage ( src/Language/Haskell/BuildWrapper/GHCStorage.hs, dist/dist-sandbox-80d764cb/build/Language/Haskell/BuildWrapper/GHCStorage.o )
[4 of 6] Compiling Language.Haskell.BuildWrapper.GHC ( src/Language/Haskell/BuildWrapper/GHC.hs, dist/dist-sandbox-80d764cb/build/Language/Haskell/BuildWrapper/GHC.o )

src/Language/Haskell/BuildWrapper/GHC.hs:304:105:
    Couldn't match expected type ‘PrintUnqualified’
                with actual type ‘(QueryQualifyName, QueryQualifyModule)’
    In the first argument of ‘showSDUser’, namely
      ‘(qualName style, qualModule style)’
    In the second argument of ‘($)’, namely
      ‘showSDUser (qualName style, qualModule style) df msg’
    In the second argument of ‘($)’, namely
      ‘removeStatus status
       $ showSDUser (qualName style, qualModule style) df msg’

src/Language/Haskell/BuildWrapper/GHC.hs:532:110:
    Couldn't match expected type ‘PrintUnqualified’
                with actual type ‘(QueryQualifyName, QueryQualifyModule)’
    In the first argument of ‘showSDUser’, namely ‘q’
    In the second argument of ‘($)’, namely ‘showSDUser q df pprTyp’

src/Language/Haskell/BuildWrapper/GHC.hs:558:31:
    Could not deduce (Foldable t1) arising from a use of ‘null’
    from the context (GhcMonad m)
      bound by the type signature for
                 getEvalResults :: GhcMonad m => String -> m [EvalResult]
      at src/Language/Haskell/BuildWrapper/GHC.hs:(504,19)-(506,44)
    or from (Num a, Ord a)
      bound by the inferred type of
               cPprShowable :: (Num a, Ord a) => a -> Term -> m (Maybe SDoc)
      at src/Language/Haskell/BuildWrapper/GHC.hs:(546,5)-(566,37)
    The type variable ‘t1’ is ambiguous
    Note: there are several potential instances:
      instance Foldable (Control.Applicative.Const m)
        -- Defined in ‘Control.Applicative’
      instance Foldable (Either a) -- Defined in ‘Data.Foldable’
      instance Foldable Data.Functor.Identity.Identity
        -- Defined in ‘Data.Functor.Identity’
      ...plus 100 others
    In the first argument of ‘not’, namely ‘(null txt)’
    In the expression: not (null txt)
    In the second argument of ‘($)’, namely
      ‘if not (null txt) then
           Just $ cparen (prec >= myprec && needsParens txt) (text txt)
       else
           Nothing’

src/Language/Haskell/BuildWrapper/GHC.hs:576:65:
    Couldn't match type ‘TyThing’ with ‘Var’
    Expected type: Id
      Actual type: TyThing
    In the expression: mkid
    In the second argument of ‘extendInteractiveContext’, namely
      ‘[mkid]’

src/Language/Haskell/BuildWrapper/GHC.hs:577:33:
    Couldn't match expected type ‘HscTypes.InteractiveContext’
                with actual type ‘[GHC.TyCon]
                                  -> [ClsInst]
                                  -> [FamInst]
                                  -> Maybe [Type]
                                  -> [PatSyn.PatSyn]
                                  -> HscTypes.InteractiveContext’
    Probable cause: ‘new_ic’ is applied to too few arguments
    In the ‘hsc_IC’ field of a record
    In the expression: hsc_env {hsc_IC = new_ic}

src/Language/Haskell/BuildWrapper/GHC.hs:794:38:
    Couldn't match expected type ‘P [Located Token]’
                with actual type ‘(Located Token -> P a2) -> [GenLocated t0 Token]’
    Probable cause: ‘go’ is applied to too few arguments
    In the first argument of ‘unP’, namely ‘go’
    In the expression: unP go initState

src/Language/Haskell/BuildWrapper/GHC.hs:802:21:
    Couldn't match type ‘P a’ with ‘GenLocated t Token’
    Expected type: (Located Token -> P a) -> GenLocated t Token
      Actual type: (Located Token -> P a) -> P a
    Relevant bindings include
      go :: (Located Token -> P a) -> [GenLocated t Token]
        (bound at src/Language/Haskell/BuildWrapper/GHC.hs:801:11)
    In a stmt of a 'do' block: ltok <- lexer return
    In the expression:
      do { ltok <- lexer return;
           case ltok of {
             L _ ITeof -> return []
             _ -> liftM (ltok :) go } }

src/Language/Haskell/BuildWrapper/GHC.hs:802:27:
    Couldn't match expected type ‘Bool’ with actual type ‘a1 -> m0 a1’
    Probable cause: ‘return’ is applied to too few arguments
    In the first argument of ‘lexer’, namely ‘return’
    In a stmt of a 'do' block: ltok <- lexer return

src/Language/Haskell/BuildWrapper/GHC.hs:990:17:
    Non type-variable argument
      in the constraint: Data.String.IsString [a]
    (Use FlexibleContexts to permit this)
    When checking that ‘pragmaBehavior’ has the inferred type
      pragmaBehavior :: forall a.
                        (Eq a, Data.String.IsString [a]) =>
                        [a] -> PPBehavior -> PPBehavior
    In an equation for ‘preprocessSource’:
        preprocessSource contents literate
          = let
              (ts1, s2) = ...
              (ts2, s3) = ppSF s2 ppSCpp
            in (ts1 ++ ts2, s3)
          where
              ppSF contents2 p = let ... in (reverse ts, unlines $ reverse nc)
              ppSCpp ::
                ([TokenDef], [String], PPBehavior)
                -> (String, Int) -> ([TokenDef], [String], PPBehavior)
              ppSCpp (ts2, l2, f) (l, c)
                | (Continue _) <- f
                = addPPToken "PP" (l, c) (ts2, l2, lineBehavior l f)
                | (ContinuePragma f2) <- f
                = addPPToken "P" (l, c) (ts2, "" : l2, pragmaBehavior l f2)
                | ('#' : _) <- l
                = addPPToken "PP" (l, c) (ts2, l2, lineBehavior l f)
                | Just (l', s, e, f2) <- pragmaExtract l f
                = (TokenDef "P" (mkFileSpan c s c e) : ts2, l' : l2, f2)
                | (Indent n) <- f
                = (ts2, l : (replicate n (takeWhile (== ' ') l) ++ l2), Start)
                | otherwise = (ts2, l : l2, Start)
              ppSLit ::
                ([TokenDef], [String], PPBehavior)
                -> (String, Int) -> ([TokenDef], [String], PPBehavior)
              ....

src/Language/Haskell/BuildWrapper/GHC.hs:1137:12:
    Constructor ‘ITspec_prag’ should have 1 argument, but has been given none
    In the pattern: ITspec_prag
    In an equation for ‘tokenType’: tokenType ITspec_prag = "P"

src/Language/Haskell/BuildWrapper/GHC.hs:1359:92:
    Couldn't match type ‘GenLocated SrcSpan [LIE Name]’
                   with ‘[LIE Name]’
    Expected type: Maybe (Bool, [LIE Name])
      Actual type: Maybe (Bool, Located [LIE Name])
    In the second argument of ‘($)’, namely ‘ideclHiding imp’
    In the second argument of ‘($)’, namely
      ‘maybe [] snd $ ideclHiding imp’

src/Language/Haskell/BuildWrapper/GHC.hs:1375:94:
    Couldn't match type ‘GenLocated SrcSpan Name’ with ‘Name’
    Expected type: Name
      Actual type: Located Name
    In the fifth argument of ‘ghcNameToUsage’, namely ‘nm’
    In the expression:
      ghcNameToUsage df tpkg tmod tsection nm src False

src/Language/Haskell/BuildWrapper/GHC.hs:1376:99:
    Couldn't match type ‘GenLocated SrcSpan Name’ with ‘Name’
    Expected type: Name
      Actual type: Located Name
    In the fifth argument of ‘ghcNameToUsage’, namely ‘nm’
    In the expression: ghcNameToUsage df tpkg tmod tsection nm src True

src/Language/Haskell/BuildWrapper/GHC.hs:1377:99:
    Couldn't match type ‘GenLocated SrcSpan Name’ with ‘Name’
    Expected type: Name
      Actual type: Located Name
    In the fifth argument of ‘ghcNameToUsage’, namely ‘nm’
    In the expression: ghcNameToUsage df tpkg tmod tsection nm src True

src/Language/Haskell/BuildWrapper/GHC.hs:1378:104:
    Couldn't match type ‘GenLocated SrcSpan Name’ with ‘Name’
    Expected type: Name
      Actual type: Located Name
    In the fifth argument of ‘ghcNameToUsage’, namely ‘nm’
    In the first argument of ‘(:)’, namely
      ‘ghcNameToUsage df tpkg tmod tsection nm src True’

src/Language/Haskell/BuildWrapper/GHC.hs:1379:71:
    Couldn't match type ‘GenLocated SrcSpan Name’ with ‘Name’
    Expected type: [Name]
      Actual type: [Located Name]
    In the second argument of ‘map’, namely ‘cons’
    In the second argument of ‘(:)’, namely
      ‘map
         (\ x -> ghcNameToUsage df tpkg tmod tsection x src False) cons’

src/Language/Haskell/BuildWrapper/GHC.hs:1388:72:
    Couldn't match type ‘ModuleName’
                   with ‘GenLocated SrcSpan ModuleName’
    Expected type: DM.Map (Located ModuleName) [Located ModuleName]
      Actual type: AliasMap
    In the second argument of ‘DM.lookup’, namely ‘moduMap’
    In the second argument of ‘fromMaybe’, namely
      ‘(DM.lookup modu moduMap)’

src/Language/Haskell/BuildWrapper/GHC.hs:1398:35:
    Couldn't match type ‘GenLocated SrcSpan ModuleName’
                   with ‘ModuleName’
    Expected type: [ModuleName]
      Actual type: [Located ModuleName]
    In the second argument of ‘mapM’, namely ‘realModus’
    In a stmt of a 'do' block:
      mapM
        (\ modu2
           -> do { pkg <- lookupModule modu2 Nothing;
                   let tpkg = ...;
                   let tmod = ...;
                   .... })
        realModus

src/Language/Haskell/BuildWrapper/GHC.hs:1425:77:
    Couldn't match type ‘GenLocated SrcSpan [LIE Name]’
                   with ‘[GenLocated l0 a0]’
    Expected type: [GenLocated l0 a0]
      Actual type: Located [LIE Name]
    In the second argument of ‘map’, namely ‘ns’
    In the expression: map (T.pack . showSD False df . ppr . unLoc) ns
cabal: Error: some packages failed to install:
buildwrapper-0.9.2 failed during the building phase. The exception was:
@JPMoresmau
Copy link
Owner

Well yes that's one of the reasons I've abandonned BuildWrapper and EclipseFP. Since they rely on the GHC API, every new release of GHC mean having to adapt to the changes, and I was the only maintainer of all these projects. If you're interested in pursuing EclipseFP, you can either take over BuildWrapper and adapt it to GHC 7.10, or maybe adapt EclipseFP to use another GHC API wrapper, like ide-backend maybe.

@DawidLoubser
Copy link
Author

Thanks for the context, JP! I'm curious, if EclipseFP is currently dead, what are you guys using? I'm still searching for the elusive "useful Haskell IDE", and for a while, I was convinced that EclipseFP was it.

Any pointers for a fellow enthusiast without a clever editor? (syntax highlighting just isn't enough)

BTW, I might indeed consider taking over BuildWrapper, but I don't know much about it. Apart from diving into the code, is there anywhere that I can get some design insight from?

@JPMoresmau
Copy link
Owner

I've started using Leksah, since I'm not a huge emacs fan. It's OK but missing things I was used to in EclipseFP, hopefully it will improve if people use it and submit pull requests!

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

No branches or pull requests

2 participants