2012/2/7 Mikhail Vorozhtsov <mikhail.vorozht...@gmail.com>:
> Ah, sorry, I got sloppy. Have you encountered situations where partial
> application of such "constraint aliases" becomes a problem?

In the particular case of the Existential class I'm not sure (it's
hard to imagine a real-world application for it in the first place),
but, in general, yes: the (:&:) combinator from
Control.Constraint.Combine depends on it, for example.

You want to be able to write:

type MyExists = Exists1 (MonadState A :&: MonadWriter B :&: MonadReader C)

That's a bad example because monads aren't very useful with
existentials, but you get the idea.

For ExistentialWith it might not particularly matter, but for client
code the class+instance way is all advantage and no drawback, so I see
no reason not to prefer it.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to