decode package:base

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.)
The function decodeFloat applied to a real floating-point number returns the significand expressed as an Integer and an appropriately scaled exponent (an Int). If decodeFloat x yields (m,n), then x is equal in value to m*b^^n, where b is the floating-point radix, and furthermore, either m and n are both zero or else b^(d-1) <= abs m < b^d, where d is the value of floatDigits x. In particular, decodeFloat 0 = (0,0). If the type contains a negative zero, also decodeFloat (-0.0) = (0,0). The result of decodeFloat x is unspecified if either of isNaN x or isInfinite x is True.
Convert to integer. First component of the result is -1 or 1, indicating the sign of the mantissa. The next two are the high and low 32 bits of the mantissa respectively, and the last is the exponent.
Decode Double# into mantissa and base-2 exponent.
Convert to integers. First Int# in result is the mantissa; second is the exponent.
Decode a single character at the given Addr#.
Decode a single codepoint starting at the given byte offset into a ByteArray#.
Decode a single codepoint starting at the given Ptr.
Creates a means of decoding bytes into characters: the result must not be shared between several byte sequences or simultaneously across threads