[Haskell-cafe] Contexts for type family instances

Stephen Tetley stephen.tetley at gmail.com
Sun Dec 12 14:20:54 CET 2010


On 12 December 2010 13:03, Max Bolingbroke <batterseapower at hotmail.com> wrote:

>
> type instance DUnit (a,b) = GuardEq (DUnit a) (DUnit b)
>
> type family GuardEq a b :: *
> type instance GuardEq a a = a


Thanks Max, that seems to be what I need.


Best wishes

Stephen



More information about the Haskell-Cafe mailing list