#4170: Invalid "duplicate instance" error
---------------------------------+------------------------------------------
Reporter: verdelyi | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.3 | Keywords:
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Test case:
{{{
{-# LANGUAGE TemplateHaskell #-}
import Language.Haskell.TH
class LOL a
lol :: Q [Dec]
lol = [d|
instance LOL Int
|]
instance LOL Int
}}}
Error:
{{{
duplicateinstance.hs:9:13:
Duplicate instance declarations:
instance LOL Int -- Defined at duplicateinstance.hs:9:13-19
instance LOL Int -- Defined at duplicateinstance.hs:12:9-15
In the Template Haskell quotation
[d|
instance LOL Int where |]
In the expression:
[d|
instance LOL Int where |]
In the definition of `lol':
lol = [d|
instance LOL Int where |]
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4170>
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