On Thursday 07 December 2006 09:44, S. Alexander Jacobson wrote:
> I guess I'm also not sure what belongs in a GADT and what belongs in a
> typeclass e.g. here is an Arrow GADT
>
>    data Arrow b c where
>      Arr::(b->c) -> Arrow b c
>      Compose::Arrow b c -> Arrow c d -> Arrow b d
>      First::Arrow a b -> Arrow (a,c) (b,c)
>
> When Arrow is defined like this, rather than write instances you just
> various evaluation functions for the Arrow GADT.

How would the GADT solution handle the behaviours captured in the other Arrow 
classes, eg ArrowIf, ArrowLoop etc?

It doesn't seem right to just add constructors for all those extra functions.

Daniel
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to