|
|
|
|
|
| Description |
| This module provides a method of getting input from files named
on the command line or, if no files are provided, from standard
input. This mimics Perl's default input handling, which is
convenient. Also, the module provides versions of the standard
interact function that use these input-getting behaviors. |
|
| Synopsis |
|
|
|
| Documentation |
|
| getInputDefault :: IO String |
| Reads the arguments passed on the command line and then passes
them to getInputFromArgs for handling. |
|
| getInputFromArgs :: [String] -> IO String |
| Treats the input list as a list of files from which to read
input sequentially. If the list is empty, input is read from
standard input. If - is passed as a file, it is taken to
mean standard input. |
|
| interactDefault :: (String -> String) -> IO () |
| Gets input via getInputDefault, processes it with the
function argument f, and then prints the String that
f returns. |
|
| interactFromArgs :: [String] -> (String -> String) -> IO () |
| Gets input via getInputFromArgs, processes it with the
function argument f, and then prints the String that
f returns. |
|
| Produced by Haddock version 0.4 |