[Haskell-cafe] handling read exceptions
S. Alexander Jacobson
alex at alexjacobson.com
Mon Apr 12 13:18:51 EDT 2004
I mean catch the read exception without escaping
all the way out to the IO monad.
-Alex-
On Mon, 12 Apr 2004, S. Alexander Jacobson wrote:
> I want to read strings that look like "2" or
> "hello" into values of type Integer or String.
> The problem is that read requires that strings be
> read as "\"hello\"". Is there a way either to
> convince read to not require wrapping quotation
> marks or, alternetively, to catch a read
> exception, and do something sane?
>
> -Alex-
>
> _________________________________________________________________
> S. Alexander Jacobson mailto:me at alexjacobson.com
> tel:917-770-6565 http://alexjacobson.com
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_________________________________________________________________
S. Alexander Jacobson mailto:me at alexjacobson.com
tel:917-770-6565 http://alexjacobson.com
More information about the Haskell-Cafe
mailing list