[Haskell-cafe] template haskell overly conservative during splicing?

Nicolas Frisby nicolas.frisby at gmail.com
Mon Nov 3 20:02:55 EST 2008


When using template haskell (via Derive) to generate this (exact) instance:

  instance Foldable ((->) Int) => Foldable
Data.Derivable.InterpreterLib.Test.List
      where foldMap f (Cons x0 x1) = (const mempty Cons `mappend`
foldMap f x0) `mappend` foldMap f x1
            foldMap f (Nil) = const mempty Nil

I realize the context is insatisfiable. My issue, is that I can't even
reach that "challenge". I get this error instead:

   Malformed type AppT ArrowT (ConT GHC.Base.Int)
    When splicing generated code into the program

I couldn't find an existing ticket or discussion for this issue
relying on the phrase "malformed type". I couldn't even find the
source that generates that string in haskell-src, template-haskell, or
ghc-6.8.2. Can anybody help?

Thanks for your time.


More information about the Haskell-Cafe mailing list