<div dir="ltr">It would also render the combinator useless for its normal purpose.<div><br></div><div>optional is used mostly to try to run a parser and to either succeed with itsĀ  result (wrapped in a Just) or _failing that_ to justĀ  return Nothing and carry on.</div><div><br></div><div>For monads like parsec, the first parse is the one that gets returned, so the definition isn't symmetric in behavior.</div><div><br></div><div>-Edward</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 1, 2019 at 2:28 AM Dannyu NDos <<a href="mailto:ndospark320@gmail.com">ndospark320@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">The current 'one or none' definition breaks the order of elements.<div dir="auto"><br></div><div dir="auto">It is more Ord-friendly to define it as 'none or one'.</div></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>