String -> ByteString +base

Warning: Unknown type ByteString

error :: [Char] -> a
base Prelude
error stops execution and displays an error message.
trace :: String -> a -> a
base Debug.Trace
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.
read :: Read a => String -> a
base Prelude, base Text.Read
The read function reads input from a string, which must be completely consumed by the input process.
fromString :: IsString a => String -> a
base Data.String, base GHC.Exts
printf :: PrintfType r => String -> r
base Text.Printf
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. Examples: > > printf "%d\n" (23::Int) > 23 > > printf "%s %s\n" "Hello" "World" > Hello World > > printf "%.2f\n" pi > 3.14
throwErrno :: String -> IO a
base Foreign.C.Error
Throw an IOError corresponding to the current value of getErrno.
fail :: Monad m => String -> m a
base Prelude, base Control.Monad, base Control.Monad.Instances
hPrintf :: HPrintfType r => Handle -> String -> r
base Text.Printf
Similar to printf, except that output is via the specified Handle. The return type is restricted to (IO a).
ReqArg :: (String -> a) -> String -> ArgDescr a
base System.Console.GetOpt
option requires argument
OptArg :: (Maybe String -> a) -> String -> ArgDescr a
base System.Console.GetOpt
optional argument
withProgName :: String -> IO a -> IO a
base System.Environment
withProgName name act - while executing action act, have getProgName return name.
withCWString :: String -> (CWString -> IO a) -> IO a
base Foreign.C.String
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.
withCAString :: String -> (CString -> IO a) -> IO a
base Foreign.C.String
Marshal a Haskell string into a NUL terminated C 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.
withCString :: String -> (CString -> IO a) -> IO a
base Foreign.C.String
Marshal a Haskell string into a NUL terminated C 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.
withCWStringLen :: String -> (CWStringLen -> IO a) -> IO a
base Foreign.C.String
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.
withCAStringLen :: String -> (CStringLen -> IO a) -> IO a
base Foreign.C.String
Marshal a Haskell string into a C string (ie, character array) in temporary storage, with explicit length information. * 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.
withCStringLen :: String -> (CStringLen -> IO a) -> IO a
base Foreign.C.String
Marshal a Haskell string into a C string (ie, character array) in temporary storage, with explicit length information. * 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.
throwErrnoPath :: String -> FilePath -> IO a
base Foreign.C.Error
as throwErrno, but exceptions include the given path when appropriate.
readIO :: Read a => String -> IO a
base Prelude, base System.IO
The readIO function is similar to read except that it signals parse failure to the IO monad instead of terminating the program.
genericLength :: Num i => [b] -> i
base Data.List
The genericLength function is an overloaded version of length. In particular, instead of returning an Int, it returns any type which is an instance of Num. It is, however, less efficient than length.
throwErrnoIf :: (a -> Bool) -> String -> IO a -> IO a
base Foreign.C.Error
Throw an IOError corresponding to the current value of getErrno if the result value of the IO action meets the given predicate.
throwErrnoIfRetry :: (a -> Bool) -> String -> IO a -> IO a
base Foreign.C.Error
as throwErrnoIf, but retry the IO action when it yields the error code eINTR - this amounts to the standard retry loop for interrupted POSIX system calls.
unsafeCoerce :: a -> b
base Unsafe.Coerce
throwDyn :: Typeable exception => exception -> b
base Control.OldException
Raise any value as an exception, provided it is in the Typeable class.
withMany :: (a -> (b -> res) -> res) -> [a] -> ([b] -> res) -> res
base Foreign.Marshal.Utils
Replicates a withXXX combinator over a list of objects, yielding a list of marshalled objects
foldr :: (a -> b -> b) -> b -> [a] -> b
base Prelude, base Data.List
foldr, applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left: > foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)
foldl :: (a -> b -> a) -> a -> [b] -> a
base Prelude, base Data.List
foldl, applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right: > foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn The list must be finite.
foldl' :: (a -> b -> a) -> a -> [b] -> a
base Data.List
A strict version of foldl.
throwErrnoIfMinus1 :: Num a => String -> IO a -> IO a
base Foreign.C.Error
Throw an IOError corresponding to the current value of getErrno if the IO action returns a result of -1.
throwErrnoIfMinus1Retry :: Num a => String -> IO a -> IO a
base Foreign.C.Error
Throw an IOError corresponding to the current value of getErrno if the IO action returns a result of -1, but retries in case of an interrupted operation.
withArgs :: [String] -> IO a -> IO a
base System.Environment
withArgs args act - while executing action act, have getArgs return args.
withArrayLen :: Storable a => [a] -> (Int -> Ptr a -> IO b) -> IO b
base Foreign.Marshal.Array
Like withArray, but the action gets the number of values as an additional parameter
withArray :: Storable a => [a] -> (Ptr a -> IO b) -> IO b
base Foreign.Marshal.Array
Temporarily store a list of storable values in memory (like Foreign.Marshal.Utils.with, but for multiple elements).
map :: (a -> b) -> [a] -> [b]
base Prelude, base Data.List
map f xs is the list obtained by applying f to each element of xs, i.e., > map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn] > map f [x1, x2, ...] == [f x1, f x2, ...]
concatMap :: (a -> [b]) -> [a] -> [b]
base Prelude, base Data.List
Map a function over a list and concatenate the results.
mapMaybe :: (a -> Maybe b) -> [a] -> [b]
base Data.Maybe
The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Nothing, no element is added on to the result list. If it just Just b, then b is included in the result list.
withBinaryFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
base System.IO
withBinaryFile name mode act opens a file using openBinaryFile and passes the resulting handle to the computation act. The handle will be closed on exit from withBinaryFile, whether by normal termination or by raising an exception.
withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
base System.IO
withFile name mode act opens a file using openFile and passes the resulting handle to the computation act. The handle will be closed on exit from withFile, whether by normal termination or by raising an exception. If closing the handle raises an exception, then this exception will be raised by withFile rather than any exception raised by act.
($) :: (a -> b) -> a -> b
base Prelude, base Data.Function
Application operator. This operator is redundant, since ordinary application (f x) means the same as (f $ x). However, $ has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example: > f $ g $ h x = f (g (h x)) It is also useful in higher-order situations, such as map ($ 0) xs, or Data.List.zipWith ($) fs xs.
($!) :: (a -> b) -> a -> b
base Prelude
Strict (call-by-value) application, defined in terms of seq.

Show more results