[GHC] #11715: Constraint vs *
GHC
ghc-devs at haskell.org
Mon Aug 22 07:15:16 UTC 2016
#11715: Constraint vs *
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner:
Type: bug | Status: new
Priority: high | Milestone: 8.2.1
Component: Compiler (Type | Version: 8.0.1-rc1
checker) |
Resolution: | Keywords: Typeable
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 simonpj):
I have not read every word here, but to me it seems:
* The main issue is whether `(Ord a)` is a singleton type. That is, if
you have two `Ord` dictionaries around, does it matter which you choose?
If it was a singleton, then `with` could not be incoherent.
Of course, we can have two different `Ord` dictionaries by declaring two
instances in different places. We could exclude that, if we wanted, by
doing as we do with type families and checking for incompatible instances.
But it's not a soundness issue so we don't.
So, is that enough? Adding `with` does not make things any more
incoherent, provided we limit the ways you can construct a value of kind
`Constraint`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11715#comment:29>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list