[GHC] #7066: isInstance does not work for compound types
GHC
ghc-devs at haskell.org
Mon Mar 31 19:17:13 UTC 2014
#7066: isInstance does not work for compound types
-------------------------------------+------------------------------------
Reporter: edsko | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Template Haskell | Version: 7.4.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by mojojojo):
I just got hit by this issue.
I would expect
{{{
isInstance clss typs
}}}
to return True if and only if I can safely generate code (in my
Template Haskell code) that relies on 'typs' being an instance of 'clss'.
In the example above, I can not safely generate code that relies on a Show
instance for (Int, A) because there is no Show instance for A.
I expected exactly the same. That's why I believe that the current
behaviour of the function is unintuitive to say the least. The
documentation has no info concerning such behaviour either.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7066#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list