fork(1) download
  1. instance (Read a) => Read (IO a) where
  2. readsPrec d s =
  3. let xs = readsPrec d s in
  4. let m (x, s) = (return x, s) in
  5. map m xs
  6.  
  7. main = do
  8. read "123" :: IO Int
  9. print "Hello"
  10. x <- read "123" :: IO Int
  11. print $ "World" ++ show x
  12. y <- read "42"
  13. print $ "World" ++ showInt y
  14.  
  15. showInt :: Int -> String
  16. showInt = show
Success #stdin #stdout 0.01s 5456KB
stdin
Standard input is empty
stdout
"Hello"
"World123"
"World42"