#4125: Template haskell rejects duplicate instances before they're spliced
---------------------------------+------------------------------------------
Reporter: lilac | Owner:
Type: bug | Status: new
Priority: normal | Component: Template Haskell
Version: 6.12.1 | Keywords:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: GHC rejects valid program
---------------------------------+------------------------------------------
Suppose I want to see (from within ghci) how to write an instance
declaration in the TH AST. I try:
{{{
Prelude> runQ $ [d| instance Monad Maybe where |]
<interactive>:1:13:
Duplicate instance declarations:
instance Monad Maybe -- Defined at <interactive>:1:13-23
instance Monad Maybe -- Defined in Data.Maybe
In the Template Haskell quotation
[d|
instance Monad Maybe where |]
In the expression:
[d|
instance Monad Maybe where |]
In the definition of `it':
it = [d|
instance Monad Maybe where |]
}}}
This seems ridiculous; I'm not trying to create an instance, just to
create a TH AST fragment.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4125>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs