[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / CONTRIB / pphs / docs / string2.hs
1 main = appendChan stdout "please type a filename\n" exit (
2        readChan stdin exit (\ userInput ->
3        let (name : _) = lines userInput in
4        appendChan stdout name exit (
5        readFile name (\ ioerror -> appendChan stdout
6                                    "can't open file" exit done)
7                      (\ contents ->
8        appendChan stdout contents exit done))))