[GHC] #15412: "Instance head is not headed by a class" when `Constraint` replaced with `type C = Constraint`

GHC ghc-devs at haskell.org
Wed Jul 18 14:05:05 UTC 2018


#15412: "Instance head is not headed by a class" when `Constraint` replaced with
`type C = Constraint`
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
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 Iceland_jack):

 Yes sorry, I should have included the failing code. Here is a version
 without type families

 {{{#!hs
 {-# Language DataKinds, TypeInType, ConstraintKinds #-}

 import Data.Kind

 data A :: Type

 type C = Constraint
 type UnitC = (() :: C)

 instance UnitC => Eq A where
   (==) = undefined
 }}}

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


More information about the ghc-tickets mailing list