[GHC] #7066: isInstance does not work for compound types
GHC
cvs-ghc at haskell.org
Wed Jul 11 14:05:41 CEST 2012
#7066: isInstance does not work for compound types
------------------------------+---------------------------------------------
Reporter: edsko | Owner:
Type: bug | Status: new
Priority: normal | Component: Template Haskell
Version: 7.4.2 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
Consider
{{{
import Language.Haskell.TH.Syntax
data A = A
test :: Q [Dec]
test = do
tp <- [t| (Int, A) |]
inst1 <- isInstance ''Show [ tp ]
runIO $ print inst1
return []
}}}
This prints True even though there is no Show instance for A (the Show
instance it finds is for pairs, but it does not verify that there are Show
instances for the pair components).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7066>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list