stdin is a handle managing the programs standard input.
Modulebase-4.22.0.0Haskell2010
GHC.IO.StdHandles
This model abstracts away the platform specific handles that can be toggled through the RTS.
- 9 values
- Packagebase-4.22.0.0
- Exports9
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceStdHandles.hs
stdout is a handle managing the programs standard output.
stderr is a handle managing the programs standard error.
openFile The computation openFile path mode returns a file handle that can be
used to interact with the file.
The handle is open in text mode with localeEncoding.
You can change the encoding with System.IO.hSetEncoding.
openBinaryFile The computation openBinaryFile path mode returns a file handle that can be
used to interact with the binary file.
This is different from openFile as in that it does not use any file encoding.
withFile The computation withFile path mode action opens the file and runs action
with the obtained handle before closing the file.
Even when an exception is raised within the action, the file will still be closed.
This is why withFile path mode act is preferable to
openFile path mode >>= (\hdl -> act hdl >>= System.IO.hClose hdl)See also: System.IO.bracket
The computation withBinaryFile path mode action opens the binary file
and runs action with the obtained handle before closing the binary file.
This is different from withFile as in that it does not use any file encoding.
Even when an exception is raised within the action, the file will still be closed.
This is why withBinaryFile path mode act is preferable to
openBinaryFile path mode >>= (\hdl -> act hdl >>= System.IO.hClose hdl)See also: System.IO.bracket