decode
Decode a
StackSnapshot to a stacktrace (a list of
StackEntry). The stack trace is created from return frames with
according
InfoProvEnt entries. To generate them, use the GHC
flag
-finfo-table-map. If there are no
InfoProvEnt
entries, an empty list is returned.
Please note:
- To gather StackEntry from libraries, these have to be
compiled with -finfo-table-map, too.
- Due to optimizations by GHC (e.g. inlining) the stacktrace may
change with different GHC parameters and versions.
- The stack trace is empty (by design) if there are no return frames
on the stack. (These are pushed every time when a case ... of
scrutinee is evaluated.)
Efficiently deserialize a JSON value from a lazy
ByteString. If
this fails due to incomplete or invalid input,
Nothing is
returned.
Decode a value from a lazy ByteString, reconstructing the original
structure.
Try to extract a character from a byte string. Returns
Nothing
if there are no more bytes in the byte string. Otherwise, it returns a
decoded character and the number of bytes used in its representation.
Errors are replaced by character
'\0xFFFD'.
Decode a UTF8 string packed into a list of
Word8 values,
directly to
String
Try to extract a character from a byte string. Returns
Nothing
if there are no more bytes in the byte string. Otherwise, it returns a
decoded character and the number of bytes used in its representation.
Errors are replaced by character
'\0xFFFD'.
Try to extract a character from a byte string. Returns
Nothing
if there are no more bytes in the byte string. Otherwise, it returns a
decoded character and the number of bytes used in its representation.
Errors are replaced by character
'\0xFFFD'.
Extract the first character for the underlying representation, if one
is available. It also returns the number of bytes used in the
representation of the character. See also
uncons.
Decode a value from a strict ByteString, reconstructing the original
structure.
Decode a base64-encoded string. This function strictly follows the
specification in
RFC 4648.
(Note: this means that even
"\n" and
"\r\n" as line
breaks are rejected rather than ignored. If you are using this in the
context of a standard that overrules RFC 4648 such as HTTP multipart
mime bodies, consider using
decodeLenient.)
Decode a base64-encoded string. This function strictly follows the
specification in
RFC 4648.
Decode a base64url-encoded string applying padding if necessary. This
function follows the specification in
RFC 4648 and in
RFC
7049 2.4
Deprecated: Please use decodeEither or decodeThrow, which provide
information on how the decode failed
Convert bytes into text, using the provided codec. If the codec is not
capable of decoding an input byte sequence, an exception will be
thrown.
Since 0.3.0
Decode a base16-encoded
ByteString value. If errors are
encountered during the decoding process, then an error message and
character offset will be returned in the
Left clause of the
coproduct.
Examples:
decode "666f6f" == Right "foo"
decode "66quux" == Left "invalid character at offset: 2"
decode "666quux" == Left "invalid character at offset: 3"
Decode a base16-encoded
ByteString value. If errors are
encountered during the decoding process, then an error message and
character offset will be returned in the
Left clause of the
coproduct.
Examples:
decode "666f6f" == Right "foo"
decode "66quux" == Left "invalid character at offset: 2"
decode "666quu" == Left "invalid character at offset: 3"
Convert a
FilePath from a platform‐specific format, suitable
for use with external OS functions.
Note: The type
platformTextFormat can change depending upon
the underlying compilation platform. Consider using
fromText or
decodeString instead. See
Rules for more information.
Since: 0.3
Convert a
FilePath from a platform‐specific format, suitable
for use with external OS functions.
Note: The type of
platformTextFormat can change depending
upon the underlying compilation platform. Consider using
fromText or
decodeString instead. See
Rules for
more information.
Since: 0.3
Decode a String representing a JSON value (either an object, array,
bool, number, null)
This is a superset of JSON, as types other than Array and Object are
allowed at the top level.
Definition of a given
Decoder for a type.
Definition of a given
Decoder for a type.