[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 08:53:00 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 monoidal):
The failing code is obtained by replacing `Constraint` by `C`:
{{{
{-# Language DataKinds, TypeInType, TypeFamilies #-}
import Data.Kind
newtype I a = I a
type C = Constraint
type family
UnitC :: C where
UnitC = ()
instance UnitC => Functor I where
fmap = undefined
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15412#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list