cabal install template-haskell-2.4.0.0 fails on ghc 6.10.4

Bernie Pope florbitous at gmail.com
Wed Mar 24 21:28:06 EDT 2010


I'm trying to install template-haskell-2.4.0.0 on OS X with ghc
6.10.4, but get a compilation error:

cabal install template-haskell-2.4.0.0
Resolving dependencies...
Configuring template-haskell-2.4.0.0...
Preprocessing library template-haskell-2.4.0.0...
Building template-haskell-2.4.0.0...
[1 of 7] Compiling Language.Haskell.TH.Syntax.Internals (
Language/Haskell/TH/Syntax/Internals.hs,
dist/build/Language/Haskell/TH/Syntax/Internals.o )
[2 of 7] Compiling Language.Haskell.TH.Syntax (
Language/Haskell/TH/Syntax.hs, dist/build/Language/Haskell/TH/Syntax.o
)
[3 of 7] Compiling Language.Haskell.TH.PprLib (
Language/Haskell/TH/PprLib.hs, dist/build/Language/Haskell/TH/PprLib.o
)
[4 of 7] Compiling Language.Haskell.TH.Ppr (
Language/Haskell/TH/Ppr.hs, dist/build/Language/Haskell/TH/Ppr.o )
[5 of 7] Compiling Language.Haskell.TH.Lib (
Language/Haskell/TH/Lib.hs, dist/build/Language/Haskell/TH/Lib.o )
[6 of 7] Compiling Language.Haskell.TH ( Language/Haskell/TH.hs,
dist/build/Language/Haskell/TH.o )
[7 of 7] Compiling Language.Haskell.TH.Quote (
Language/Haskell/TH/Quote.hs, dist/build/Language/Haskell/TH/Quote.o )

Language/Haskell/TH/Quote.hs:31:12:
    Not in scope: data constructor `CharConstr'
cabal: Error: some packages failed to install:
template-haskell-2.4.0.0 failed during the building phase. The exception was:
exit: ExitFailure 1

The offending piece of code is:

dataToQa mkCon mkLit appCon antiQ t =
    case antiQ t of
      Nothing ->
          case constrRep constr of
            AlgConstr _  ->
                appCon con conArgs
            IntConstr n ->
                mkLit $ integerL n
            FloatConstr n ->
                mkLit $ rationalL (toRational n)
            CharConstr c ->
                mkLit $ charL c

I have base 4.1.0.0 installed.

Cheers,
Bernie.


More information about the Libraries mailing list