HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

  • Packagecborg-0.2.10.0
  • Exports34
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceMagic.hs

Word utilities

ByteString utilities

Take the tail of a ByteString (i.e. drop the first byte) and read the resulting byte(s) as an 8-bit word value. The input ByteString MUST be at least 2 bytes long: one byte to drop from the front, and one to read as a Word value. This is not checked, and failure to ensure this will result in undefined behavior.

Take the tail of a ByteString (i.e. drop the first byte) and read the resulting byte(s) as a 16-bit word value. The input ByteString MUST be at least 3 bytes long: one byte to drop from the front, and two to read as a 16-bit Word value. This is not checked, and failure to ensure this will result in undefined behavior.

Take the tail of a ByteString (i.e. drop the first byte) and read the resulting byte(s) as a 32-bit word value. The input ByteString MUST be at least 5 bytes long: one byte to drop from the front, and four to read as a 32-bit Word value. This is not checked, and failure to ensure this will result in undefined behavior.

Take the tail of a ByteString (i.e. drop the first byte) and read the resulting byte(s) as a 64-bit word value. The input ByteString MUST be at least 9 bytes long: one byte to drop from the front, and eight to read as a 64-bit Word64 value. This is not checked, and failure to ensure this will result in undefined behavior.

Half-floats

Float/Word conversion

Int and Word explicit conversions

Integer utilities

Simple mutable counters

datadata Counter s

An efficient, mutable counter. Designed to be used inside ST or other primitive monads, hence it carries an abstract rank-2 s type parameter.

Array support