I/O operations required for implementing a System.IO.Handle.
Methods
ready :: a -> Bool -> Int -> IO Boolclose :: a -> IO ()closes the device. Further operations on the device should produce exceptions.
isTerminal :: a -> IO Boolreturns True if the device is a terminal or console.
isSeekable :: a -> IO Boolseek :: a -> SeekMode -> Integer -> IO Integerseek to the specified position in the data.
tell :: a -> IO Integerreturn the current position in the data.
getSize :: a -> IO Integerreturn the size of the data.
setSize :: a -> Integer -> IO ()change the size of the data.
setEcho :: a -> Bool -> IO ()for terminal devices, changes whether characters are echoed on the device.
getEcho :: a -> IO Boolreturns the current echoing status.
setRaw :: a -> Bool -> IO ()some devices (e.g. terminals) support a "raw" mode where characters entered are immediately made available to the program. If available, this operation enables raw mode.
devType :: a -> IO IODeviceTypereturns the IODeviceType corresponding to this device.
dup :: a -> IO aduplicates the device, if possible. The new device is expected to share a file pointer with the original device (like Unix
dup).dup2 :: a -> a -> IO adup2 source targetreplaces the target device with the source device. The target device is closed first, if necessary, and then it is made into a duplicate of the first device (like Unixdup2).