Ticket #7066 (new bug)
isInstance does not work for compound types
| Reported by: | edsko | Owned by: | simonpj |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.8.1 |
| Component: | Template Haskell | Version: | 7.4.2 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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).
Change History
Note: See
TracTickets for help on using
tickets.
