[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    Re: [Haskell-cafe] ANN: exists-0.1
From:       Gábor_Lehel <illissius () gmail ! com>
Date:       2012-02-07 13:26:42
Message-ID: CAPNUp09=NaTFmJFcXJqZkEsSLdDTho2-3T4Nzajv54bECiX57w () mail ! gmail ! com
[Download RAW message or body]

2012/2/7 Mikhail Vorozhtsov <mikhail.vorozhtsov@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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic