#4127: Template haskell instance declaration quotations with members don't work
in
ghci
---------------------------------+------------------------------------------
Reporter: lilac | Owner:
Type: bug | Status: new
Priority: normal | Component: GHCi
Version: 6.12.1 | Keywords:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Inside GHCi, the following quotation fails:
{{{
Prelude Language.Haskell.TH> runQ [d| instance Monad ((,) a) where return
= (,) undefined; (a,x) >>= f = f x |]
<interactive>:1:38:
`return' is not a (visible) method of class `Monad'
<interactive>:1:68:
`>>=' is not a (visible) method of class `Monad'
}}}
The same error seems to occur for any typeclass I try. This code works
fine inside a module passed to GHC.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4127>
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