The first and third work, but not the second. Why?

Michael

==============

f :: String -> IO ()
f s = do putStrLn s

{-
g :: [String] -> IO ()
g l = do s <- l
         putStrLn s
-}

{-
h :: [Int] -> [Int]
h l = do i <- l
         return (i+1)
-}

==============

serialize2.hs:29:9:
    Couldn't match expected type `[String]'
           against inferred type `IO String'
    In a stmt of a 'do' expression: s <- l
    In the expression:
        do { s <- l;
             putStrLn s }
    In the definition of `g':
        g l = do { s <- l;
                   putStrLn s }