[GHC] #11715: Constraint vs *

GHC ghc-devs at haskell.org
Mon Mar 20 08:47:38 UTC 2017


#11715: Constraint vs *
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.4.1
       Component:  Compiler (Type    |              Version:  8.0.1-rc1
  checker)                           |             Keywords:  Typeable,
      Resolution:                    |  LevityPolymorphism, Roles
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):

 Let me first note that we intend to make `Constraint` and `Type` distinct
 throughout the compiler.  Then `tcView` = `coreView` again, and this
 entire problem goes away. We should not leave this too long.

 Until then we are looking for a ''sound'' solution, but it doesn't have to
 be a ''good'' solution.

 I'm puzzled about where the instance for `C Type Eq` comes from; after
 all, `Eq :: Type -> Constraint`.

 I wonder what would go wrong if we just used `coreView` for both class and
 family instances.  I think (3); but I still don't see an example except
 perhaps with a polykinded type constructor e.g. `Typeable Type (Proxy
 Type)` and `Typeable Constraint (Proxy Constraint)`, and perhaps we can
 live with that for now.

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


More information about the ghc-tickets mailing list