[GHC] #11715: Constraint vs *

GHC ghc-devs at haskell.org
Mon Aug 22 07:38:29 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 int-index):

 Replying to [comment:27 goldfire]:

 A warning sounds like a plausible solution, provided that it's suppressed
 for class constraints.

 ----

 Replying to [comment:28 Iceland_jack]:

 That's interesting, although I am not quite sure what "reference" means in
 this context.

 ----

 Replying to [comment:29 simonpj]:

 > Of course, we can have two different `Ord` dictionaries by declaring two
 instances in different places.

 You can't have both of them in scope. And unless they are orphan
 instances, which are frowned upon, you can't use both of them in one
 program.

 > provided we limit the ways you can construct a value of kind
 `Constraint`.

 If I understand correctly, the plan is to abolish kind 'Constraint' in
 favor of 'Type'. So 'with' does make things more incoherent, as now you
 can have `Int => t` and `Int` is clearly not a singleton type, and you can
 have two distinct `Int`s in one scope.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11715#comment:30>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list