read expects strings to be quoted:

Prelude> read "\"1234\"" :: String
"1234"


On Sat, Aug 6, 2011 at 19:57, michael rice <nowg...@yahoo.com> wrote:

> Prelude> read "1234" :: Int
> 1234
> Prelude> read "1234" :: String
> "*** Exception: Prelude.read: no parse
>
> Why?
>
> Michael
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>


-- 
Scott Lawrence
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to