Ticket #4200 (closed bug: fixed)
UndecidableInstances not needed for equality constraints
| Reported by: | simonpj | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0.1 |
| Component: | Compiler | Version: | 6.12.3 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | indexed-types/should_compile/T4200 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
Consider
instance (Op c, In c ~ Int) => Op (D2 c) where ...
Without -XUndecidableInstaces we get
undec.hs:21:0:
Constraint is no smaller than the instance head
in the constraint: In c ~ Int
(Use -XUndecidableInstances to permit this)
But the undecidable-instance check is only needed for class constraints I think, so GHC is being over conservative. Let's fix this.
Change History
Note: See
TracTickets for help on using
tickets.
