[GHC] #15593: QuantifiedConstraints: trouble with type family
GHC
ghc-devs at haskell.org
Sun Sep 2 13:05:24 UTC 2018
#15593: QuantifiedConstraints: trouble with type family
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.5
Resolution: | Keywords:
| QuantifiedConstraints,
| ConstraintKinds
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):
Oh dear can of worms, what about the workaround then: does that compile on
HEAD? I will have to read that ticket
{{{#!hs
{-# Language KindSignatures, TypeFamilies, QuantifiedConstraints,
FlexibleInstances, DataKinds, TypeInType, MultiParamTypeClasses,
UndecidableInstances, AllowAmbiguousTypes, FlexibleContexts #-}
import Data.Kind
class MuRef (a :: Type) where
type DeRef a :: Type -> Type
class (MuRef (f xx), DeRef (f xx) ~ deRef1 f xx) => MuRef1_ f deRef1 xx
instance (MuRef (f xx), DeRef (f xx) ~ deRef1 f xx) => MuRef1_ f deRef1 xx
class (forall xx. cls xx) => Forall cls
instance (forall xx. cls xx) => Forall cls
class Forall (MuRef1_ f deRef1) => MuRef1 f deRef1
instance Forall (MuRef1_ f deRef1) => MuRef1 f deRef1
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15593#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list