Don Stewart <[EMAIL PROTECTED]> writes:
> The main thing is to define a safe read. This will be in the base
> library soon,
>
> maybeRead :: Read a => String -> Maybe a
> maybeRead s = case reads s of
> [(x, "")] -> Just x
> _ -> Nothing
>
> Then you can pattern match on the failure case as Nothing.
When will it be in the base library?
X-Y
--
c/* __o/*
<\ * (__
*/\ <
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe