[Haskell-cafe] read "2" in a "void" context?

Erik Rantapaa erantapaa at gmail.com
Fri May 27 18:28:26 UTC 2016


Hi fellow Haskellers!

If I bring up ghci and evaluate `read 2` I get the error "Prelude.read: no 
parse"

GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
Prelude> read "2"
*** Exception: Prelude.read: no parse

Exactly how is this message coming about? I understand that `read` needs a 
return type in order to determine which type class instance to run. So, in 
this case, which type is `read` being asked to return?

Thanks,
Erik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160527/ee1b242c/attachment.html>


More information about the Haskell-Cafe mailing list