[Haskell] Help-me read file

Gilmara Pompelli gilmarampompelli at gmail.com
Mon Oct 18 15:29:01 EDT 2010


I have a file with 100 lists, with 100 ints.

I have to read the file and apply the map and sort functions on lists.

II did it to read file:

learquivo :: FilePath -> IO ([[Int]])
learquivo s = do
           conteudo <- readFile s
           return (read conteudo)

But now applying the sort, the error appears:

   Couldn't match expected type `[a]'
          against inferred type `IO [[Int]]'

how can I fix?


More information about the Haskell mailing list