stdinF, stdoutF, et al

Stdio

Types

stdinF :: F a String
stdoutF :: F String a
stdioF :: F String String
stderrF :: F String a
outputF :: String -> F String a
appendChanK :: (FudgetIO c) => String -> String -> c a b -> c a b
echoK :: (FudgetIO c) => [Char] -> c a b -> c a b
linesSP :: SP Char [Char]
inputLinesSP :: SP [Char] [Char]

Description

These fudgets allow communication through the Haskell channel system.

stdinF reads characters from standard input and delivers them on its output as soon as they become available. It outputs a stream of strings rather than a stream of characters for efficiency reasons. An empty string in the output indicate the end of the stream.

outputF outputs the strings it receives on its input on a channel. stdoutF and stderrF output to the standard output and standard error channels, respectively.

stdioF is a combination of stdinF and stdoutF.

appendChanK provides convienient access to the AppendChan request. echoK outputs a string and a new line character on stdout.

linesSP inputs a stream of characters (including newline characters) and outputs a stream of lines. inputLinesSP inputs arbitrary chunks of characters and outputs lines. This is a useful postprocessor for stdinF.

Equalities

   stdoutF = outputF stdout
   stderrF = outputF stderr
   inputLinesSP = linesSP `serCompSP` concatSP

See Also

haskellIO