I was reading up on the deeper workings of the IO monad in Haskell on their wiki and I came across this code
main = do a <- ask "What is your name?" b <- ask "How old are you?" return () ask s = do putStr s readLn Which makes sense to me. The ask function should print out the string given to it and return a line that can be passed into a or b.
However loading this into GHCi I get problems. Tells me there isn't an instance of Read from use of ask and that I could import GHC.Read. That shouldn't be necessary. This code was on Haskell.org so I would think it should work. Was something in the language changed or is there some big piece of understanding that I am missing?