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

Achim Schneider barsoap at web.de
Tue Nov 4 02:43:28 EST 2008


"Nicolas Frisby" <nicolas.frisby at gmail.com> wrote:

> 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?
> 
Not entirely related, but you might want to append your complaints:

http://hackage.haskell.org/trac/ghc/ticket/1633


The request is for a documentation section that explains what each
error means, where it comes from, why it's there and possibly also how
to fix it in two or three paragraphs.


-- 
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.




More information about the Haskell-Cafe mailing list