
the last two instance always overlap looking only at the instance
#15359: Quantified constraints do not work with equality constraints -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.5 Resolution: | Keywords: | QuantifiedConstraints Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by AntC): Replying to [comment:11 goldfire]: heads. So I think you'd still need `{-# OVERLAPPING #-}`.
Yeah kinda; but no. GHC's overlap is a marvel of engineering compromise. So you're not squinting at the right angle. * The two instances are in no substitution order, so `OVERLAPPING`/`OVERLAPPABLE` would be rejected. * "It is fine for there to be a ''potential'' of overlap ...; an error is only reported if a particular constraint matches more than one." [Users guide] So I'm relying on type improvement to apply before instance selection: then GHC should never be looking for a Wanted that matches more than one instance. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15359#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler