Proposal #1464: add dropPrefix to Data.List

Isaac Dupree isaacdupree at charter.net
Fri Jun 29 17:30:32 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cale Gibbard wrote:
> I agree regarding Maybe, but in the long run, I really think we should
> bring back MonadZero. This issue comes up all the time because there's
> not really a proper class for monads that do handle failure gracefully
> any more. I personally consider 'fail' to be a wart, and mostly try to
> ignore that it even exists. Monad really isn't the class for
> expressing computations which might fail.

agree about Monad fail.... but does everything that can fail have to be
a monad?  /me thinks about non-monadic applicative and arrows (at least)...

there is a class ArrowZero even!

There is a Monad=>MonadPlus, an Arrow=>ArrowZero=>ArrowPlus, an
Applicative=>Alternative, a Monoid. (and the Monoid kind of has the same
issue as the two kinds of MonadPlus instances, considering the proposal
to change Data.Map's Monoid instance, perhaps)

There is a MonadFix and a ArrowLoop, but no ApplicativeFix.

The arrows are somewhat special cases since they involve
different-looking types. (I wonder how much things are going to change
when we start using associated-types... after some years...)

This feels like somewhat of an ad-hoc mess at the moment :-/

for now, I wholeheartedly support the Maybe version of dropPrefix for
the purpose of going into the existing Data.List

Isaac
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGhXn3HgcxvIWYTTURAorzAJ9GlcLCk2P0/NHrNddKeQivSU3vZQCgybiq
FTfTp6zdJjJfqPFPbH5O1A0=
=EcsX
-----END PGP SIGNATURE-----


More information about the Libraries mailing list