[GHC] #10532: Unnecessary constraints when using overlapping instances
GHC
ghc-devs at haskell.org
Tue Jun 16 00:54:50 UTC 2015
#10532: Unnecessary constraints when using overlapping instances
-------------------------------------+-------------------------------------
Reporter: MikeIzbicki | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.10.1
checker) | Keywords:
Resolution: | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by goldfire):
This looks like expected behavior to me. In the overlapping instances
case, GHC can't know which instance to choose when calling `foo` from `f`.
If you want GHC to decide based on whether `a` is `Int` at a particular
call site, then that's exactly what adding the constraint to `f`'s type
signature means.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10532#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list