Read File

Jorge Adriano
Wed, 1 May 2002 12:06:39 +0100

[moving to haskell-cafe]

>  I want to read some data from a text file. I accomplished it but I wan=
t to
> read data from file as a Integer list for example text file has [1,2,3,=
Wait you actually have "[1,2,3,5]"

> and when I read this data from file  I handeled it as string. What can =
I do
> to get it as integer list.

map read ["1","2","3"]  ::[Int]

this would be helpfull if you had "1 2 3 5".
It's easier then

read "[1,2,3,5]"::[Int]