template haskell overly conservative during splicing?

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.

"Nicolas Frisby"
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.

Thanks for the bug report. I've fixed the bug: see http://hackage.haskell.org/trac/ghc/ticket/2817 Simon | -----Original Message----- | From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of | Nicolas Frisby | Sent: 04 November 2008 01:03 | To: haskell Cafe | Subject: [Haskell-cafe] template haskell overly conservative during splicing? | | 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. | _______________________________________________ | Haskell-Cafe mailing list | Haskell-Cafe@haskell.org | http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
Achim Schneider
-
Nicolas Frisby
-
Simon Peyton-Jones