Given

data GhcPass (c :: Pass)
deriving instance Eq (GhcPass c)
deriving instance Typeable c => Data (GhcPass c)

data Pass = Parsed | Renamed | Typechecked
         deriving (Data)

Is there any way to express that `pass` must be valid for each value of
`Pass` in the following instance head?

instance (p ~ GhcPass pass, OutputableBndrId p)
       => Outputable (HsIPBinds p) where


This comes from a problem where setting each type family instance
separately does not get picked up during instance resolution (and can't be,
according to earlier questions by me on this)

i.e.

type instance XIPBinds       (GhcPass 'Parsed) = NoExt
type instance XIPBinds       (GhcPass 'Renamed) = NoExt
type instance XIPBinds       (GhcPass 'Typechecked) = TcEvBinds

it works fine for

type instance XIPBinds       (GhcPass _) = NoExt

Alan
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to