fork(1) download
  1. instance (Read a) => Read (IO a) where
  2. readsPrec d s =
  3. let f = readsPrec d in
  4. let xs = f s in
  5. map (\(x, s) -> (return x, s)) xs
  6.  
  7. main = do
  8. read "123" :: IO Int
  9. print "Hello"
  10. x <- read "123" :: IO Int
  11. print $ "World" ++ show x
Success #stdin #stdout 0.01s 5384KB
stdin
Standard input is empty
stdout
"Hello"
"World123"