ZVON > References > Haskell reference |
Intro / Search / ZVON |
| Indexes | Syntax | >> Prelude << | Ratio | Complex | Numeric | Ix | Array | List | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random |
Module: | Prelude |
---|---|
Function: | readFile |
Type: | FilePath -> IO String |
Description: | |
Related: | appendFile, writeFile |
File: /tmp/foo : BBBCCC
Program source: main = do x <- readFile "/tmp/foo.txt" putStr x
Output: BBBCCC
File: /tmp/foo.txt : [1,2,4,6,7]
Program source: main = do x <- readFile "/tmp/foo.txt" y <- rList x print (sum y) rList :: String -> IO [Int] rList = readIO
Output: 20