[Haskell-cafe] ANN: exists-0.1
illissius at gmail.com
Tue Feb 7 14:26:42 CET 2012
2012/2/7 Mikhail Vorozhtsov <mikhail.vorozhtsov at 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.
More information about the Haskell-Cafe