Difference between revisions of "Talk:MonadPlus reform proposal"

From HaskellWiki
Jump to navigation Jump to search
 
 
Line 1: Line 1:
 
This is a good proposal, I think. The standard libraries use MonadZero only in two places: functions <tt>guard</tt> and <tt>msum</tt>. <tt>msum</tt> should probably be accompanied by a reduction with <tt>morelse</tt>, which should then be called <tt>mchoice</tt>.
 
This is a good proposal, I think. The standard libraries use MonadZero only in two places: functions <tt>guard</tt> and <tt>msum</tt>. <tt>msum</tt> should probably be accompanied by a reduction with <tt>morelse</tt>, which should then be called <tt>mchoice</tt>.
   
Parsec already has operators <tt>(<++)</tt> and <tt>choice</tt> with fitting semantics. Simply calling <tt>morelse (<++)</tt> and <tt>mchoice choice</tt> might be even more convenient.
+
Parsec already has operators <tt>(<|>)</tt> and <tt>choice</tt> with fitting semantics. Simply calling <tt>morelse (<|>)</tt> and <tt>mchoice choice</tt> might be even more convenient.
   
 
--[[User:Udo Stenzel|Udo Stenzel]] 11:42, 20 January 2006 (UTC)
 
--[[User:Udo Stenzel|Udo Stenzel]] 11:42, 20 January 2006 (UTC)

Latest revision as of 12:17, 20 January 2006

This is a good proposal, I think. The standard libraries use MonadZero only in two places: functions guard and msum. msum should probably be accompanied by a reduction with morelse, which should then be called mchoice.

Parsec already has operators (<|>) and choice with fitting semantics. Simply calling morelse (<|>) and mchoice choice might be even more convenient.

--Udo Stenzel 11:42, 20 January 2006 (UTC)