<div dir="ltr"><div class="gmail_extra">On Mon, Aug 19, 2013 at 2:09 PM, Brandon Allbery <span dir="ltr">&lt;<a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Alternatively, have you considered using your own ADT? `data Validity = Success | Failure String` would give you more readable / comprehensible code without needing to worry about assumptions or common usage.</blockquote>
</div><br>Or possibly Valid and Invalid as the constructors....</div><div class="gmail_extra"><br></div><div class="gmail_extra">This also means you can easily extend it later to include multiple errors, or position information, or other annotations. You could also use it with Monoid and/or the Writer monad to track success/failure in the most appropriate way for your project, instead of being constrained to the behavior of an existing instance.<br clear="all">
<div><br></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>
<div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>