Proposal: Add Text.Read.maybeRead :: Read a => String -> Maybe a

Aaron Denney wnoise at ofb.net
Fri Feb 8 07:08:57 EST 2008


On 2008-02-08, Yitzchak Gale <gale at sefer.org> wrote:
> I vote mildly in favor of maybeRead,
> strongly against readM.
>
> "fail" refers only to failure of pattern matching.
> The wart is that its name should have been
> more specific, like "patternFail". Using
> "fail" for a non-pattern-matching error is a
> bug, not just a wart, in my opinion.

Even if you do consider it a bug, it's an extremely useful bug.
I don't see the point in deprecating it until a truly usable alternative
is actually in the standard.

-- 
Aaron Denney
-><-



More information about the Libraries mailing list