
#9242: Implement {-# OVERLAPPABLE #-} and {-# INCOHERENT #-} pragmas -------------------------------------+------------------------------------ Reporter: simonpj | Owner: diatchki Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.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 simonpj): What about the last bullet point of the ticket description? The relationship between two overlapping instances is not symmetrical. I suggested "OVERLAPPABLE" and "OVERLAPPING". Yes, it's a bit more fiddly, but much more explicit. Oh, and I suppose you should be able to have both. {{{ instance {-# OVERLAPPABE #-} C a where instance {-# OVERLAPPABLE, OVERLAPPING #-} C [a] where ... isntance {-# OVERLAPPING #-} C [Maybe a] where ... }}} Here the middle one overlaps `C a` and is overlapped by `C [Maybe a]`. Or is this over-elaborate? Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9242#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler