Hello,

> text file has [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.

Apply read:

[Warning untested code ahead]

main :: IO ()
main =
    do
        contents <- readFile "myFileWithNumbers"
        let intList = read contents :: [Int]
        print intList

Arjan


_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
  • Read File Bahadır SEVİNÇ
    • Arjan van IJzendoorn

Reply via email to