String -> ByteString -http -bytestring
error stops execution and displays an error message.
When called, trace outputs the string in its first argument, before returning the second argument as its result. The trace function is not referentially transparent, and should only be used for debugging, or for monitoring execution. Some implementations of trace may decorate the string that's output to indicate that you're tracing. The function is implemented on top of putTraceMsg.
The read function reads input from a string, which must be completely consumed by the input process.
Format a variable number of arguments with the C-style formatting string. The return value is either String or (IO a).
The format string consists of ordinary characters and /conversion specifications/, which specify how to format one of the arguments to printf in the output string. A conversion specification begins with the character %, followed by one or more of the following flags:
> - left adjust (default is right adjust)
> + always use a sign (+ or -) for signed conversions
> 0 pad with zeroes rather than spaces
followed optionally by a field width:
> num field width
> * as num, but taken from argument list
followed optionally by a precision:
> .num precision (number of decimal places)
and finally, a format character:
> c character Char, Int, Integer, ...
> d decimal Char, Int, Integer, ...
> o octal Char, Int, Integer, ...
> x hexadecimal Char, Int, Integer, ...
> X hexadecimal Char, Int, Integer, ...
> u unsigned decimal Char, Int, Integer, ...
> f floating point Float, Double
> g general format float Float, Double
> G general format float Float, Double
> e exponent format float Float, Double
> E exponent format float Float, Double
> s string String
Mismatch between the argument types and the format string will cause an exception to be thrown at runtime.
> > printf "%d\n" (23::Int)
> > printf "%s %s\n" "Hello" "World"
> Hello World
> > printf "%.2f\n" pi
Throw an IOError corresponding to the current socket error.
Similar to printf, except that output is via the specified Handle. The return type is restricted to (IO a).
option requires argument
Like throwSocketError, but the error code is supplied as an argument.
On Windows, do not use errno. Use a system error code instead.
The parse failed at the specified source location, with an error message.
Marshal a Haskell string into a NUL terminated C wide string using temporary storage.
* the Haskell string may not contain any NUL characters
* the memory is freed when the subcomputation terminates (either normally or via an exception), so the pointer to the temporary storage must not be used after this.
Show more results