why is Data.Set not a Monad?

Daniel Franke nonce+haskell.org at dfranke.us
Sun May 6 14:58:07 EDT 2007


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

On Sun, May 06, 2007 at 07:44:53PM +0100, Frederik Eaton wrote:
> Anyone know why Data.Set is not a Monad? Or Data.Map?

I'm not sure why it ought to be.  I assume that you want
return = singleton and fail _ = emptySet, but how do you propose to
define (>>=)?

- -- 
 Daniel Franke         df at dfranke.us         http://www.dfranke.us
 |----| =|\     \\\\    
 || * | -|-\---------   Man is free at the instant he wants to be. 
 -----| =|  \   ///     --Voltaire
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGPiU/KTA17JAC/eYRAkDSAJ98FGzjOUP77FpXHrnsrvmvkkQI/gCcC2A1
t+AFrEIgJGluZLXe+nYWV3Y=
=Hoh2
-----END PGP SIGNATURE-----


More information about the Libraries mailing list