Copyright | (c) Mihai Maruseac |
---|---|
License | BSD3 |
Maintainer | mihai.maruseac@gmail.com |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A skeleton library to help learners of Haskell concentrate on the pure-functional aspect and let the IO be handled by the library.
Synopsis
The Filename
type
The Input
type
The Output
type
Exported for use in main pipeline
wrapIO :: (Input -> Output -> Output) -> IO () Source #
Wraps a simple function Input
-> Output
-> Output
in
order to simplify student's usage.
Exported to be usable by students
getStdIn :: Input -> String Source #
Obtains the contents of the standard input as given to the program. Returns a String containing the input without any modification.
getInputFile :: Input -> Filename -> String Source #
Obtains the contents of an input file. Returns a String containing the input without any modification.
writeStdOut :: Output -> String -> Output Source #
Appends text to the standard output. No newline is printed at the end,
the caller must handle it. Returns a new Output
value, containing the
appended text.
writeStdErr :: Output -> String -> Output Source #
Appends text to the standard error. No newline is printed at the end, the
caller must handle it. Returns a new Output
value, containing the
appended text.
Note: When running the program, the standard error text is displayed after the entire text from the standard input is displayed.