Library report, monad zero laws
Simon Peyton-Jones
simonpj@microsoft.com
Fri, 21 Jun 2002 12:50:21 +0100
Well,
* My reluctance to change the draft H98 report is rising sharply.
* I don't think the H98 report has ever had laws about mzero etc.
* And the whole laws business is flaky because people can and do
make instances of Monad that don't obey the laws.
* Lastly, where does one stop?
Still, I have no concrete objection to adding the four "laws" below
to the Monad library spec, with the same vague status as the other
laws mentioned in the report.
Comments, anyone? Even if the consensus is to add these four
lines, I'm not going to reset the clock. I'm going to freeze in early
July if nothing substantial arises before then.
Simon
| -----Original Message-----
| From: Jon Fairbairn [mailto:Jon.Fairbairn@cl.cam.ac.uk]=20
| Sent: 20 June 2002 16:27
| To: Simon Peyton-Jones
| Subject: Library report, monad zero laws
|=20
|=20
| The old report used to include=20
|=20
| m >> zero =3D zero
| zero >>=3D m =3D zero
| m ++ zero =3D m
| zero ++ m =3D m
|=20
| after the other monad laws. Now mzero and mplus are in the=20
| library, shouldn't there be some mention of these laws there?=20
| I'd be particularly keen to see a remark about=20
|=20
| _|_ >> zero=20
|=20
| inevitably being _|_
|=20
| Cheers,
|=20
| J=F3n
|=20
|=20
|=20
| --=20
| J=F3n Fairbairn =20
| Jon.Fairbairn@cl.cam.ac.uk
| 31 Chalmers Road =20
| jf@cl.cam.ac.uk
| Cambridge CB1 3SZ +44 1223 570179 (after 14:00=20
| only, please!)
|=20
|=20
|=20