handle -quickcheck
Haskell defines operations to read and write characters from and to files, represented by values of type Handle. Each value of this type is a handle: a record used by the Haskell run-time system to manage I/O with file system objects. A handle has at least the following properties:
* whether it manages input or output or both;
* whether it is open, closed or semi-closed;
* whether the object is seekable;
* whether buffering is disabled, or enabled on a line or block basis;
* a buffer (whose length may be zero).
Most handles will also have a current I/O position indicating the next input or output operation will occur. A handle is readable if it manages only input or both input and output; likewise, it is writable if it manages only output or both input and output. A handle is open when first allocated. Once it is closed it can no longer be used for either input or output, though an implementation cannot re-use its storage while references remain to it. Handles are in the Show and Eq classes. The string produced by showing a handle is system dependent; it should include enough information to identify the handle for debugging. A handle is equal according to == only to itself; no attempt is made to compare the internal state of different handles for equality.
A version of catch with the arguments swapped around; useful in situations
> do handle (\e -> exitWith (ExitFailure 1)) $
> ...
A version of catch with the arguments swapped around; useful in situations
> do handle (\NonTermination -> exitWith (ExitFailure 1)) $
> ...
External API for GHC's Handle implementation
Catches any exception thrown by the given CGI action, returns an error page with a 500 Internal Server Error, showing the exception information, and logs the error.
Typical usage:
> cgiMain :: CGI CGIResult
> cgiMain = ...
>
> main :: IO ()
> main = runCGI (handleErrors cgiMain)
The actions to perform when a signal is received.
This package implemets API for a HandlerSocket client.
Version 0.0.5
Exception handler for socket operations.
Extracts the Fd from a Handle. This function has the side effect of closing the Handle and flushing its write buffer, if necessary.
A HandleStream-based version of Network.HTTP interface.
For more detailed information about what the individual exports do, please consult the documentation for Network.HTTP. Notice however that the functions here do not perform any kind of normalization prior to transmission (or receipt); you are responsible for doing any such yourself, or, if you prefer, just switch to using Network.HTTP function instead.
Show more results