darcs

Patch 1190 Perhaps was not a valid Monad (and 1 more)

Title Perhaps was not a valid Monad (and 1 more)
Superseder Nosy List ganesh
Related Issues
Status accepted Assigned To
Milestone

Created on 2014-09-27.08:36:55 by ganesh, last changed 2014-10-22.10:12:46 by ganesh.

Files
File name Status Uploaded Type Edit Remove
patch-preview.txt ganesh, 2014-09-27.08:36:55 text/x-darcs-patch
perhaps-was-not-a-valid-monad.dpatch ganesh, 2014-09-27.08:36:55 application/x-darcs-patch
unnamed ganesh, 2014-09-27.08:36:55
See mailing list archives for discussion on individual patches.
Messages
msg17666 (view) Author: ganesh Date: 2014-09-27.08:36:55
Aristid noticed these broken implementations of (>>) in the two
copies of the Perhaps monad - the 'Unknown' case is not
consistent with (>>=).

It seems best just to remove the specialisations as the compiler
ought to be able to optimise these anyway.

Aristid tested with replacing the faulty case with 'undefined'
and couldn't find any extra failing tests, so it also seems like
a very safe change.

2 patches for repository darcs-unstable@darcs.net:screened:

Fri Sep 26 17:45:01 BST 2014  aristidb@gmail.com
  * Perhaps was not a valid Monad

Sat Sep 27 08:37:53 BST 2014  aristidb@gmail.com
  * Remove faulty (>>) in second Perhaps
Attachments
msg17717 (view) Author: ganesh Date: 2014-10-22.10:12:46
Testing with ghc 7.4 and 7.8, accepting.
History
Date User Action Args
2014-09-27 08:36:55ganeshcreate
2014-09-27 09:02:49ganeshsetstatus: needs-screening -> needs-review
2014-10-22 10:12:46ganeshsetstatus: needs-review -> accepted
messages: + msg17717