Data.Set.findMin is a partial function
Jean-Philippe Bernardy
jeanphilippe.bernardy at gmail.com
Mon Dec 11 17:14:17 EST 2006
On 12/11/06, Henning Thielemann <lemming at henning-thielemann.de> wrote:
>
> On Mon, 11 Dec 2006, Jean-Philippe Bernardy wrote:
>
> > You can try Data.Set.minView.
> > http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data-Set.html
>
> Seems to be new in GHC-6.6 over GHC-6.4.
True, though "base 2.0" is more accurate, in light of the recent fuss
on the subject.
> I suspect that not really monadic behaviour is needed in minView, but only
> the fail method, isn't it? Confusing.
Indeed. This is standard style in many modules however. (And an
argument for the resurrection of MonadZero.)
Cheers,
JP.
More information about the Libraries
mailing list