HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulebyte-order-0.1.3.1Haskell2010

Data.Primitive.Ptr.BigEndian

This is drop-in replacement for the read, write, and index functions present in Data.Primitive.Ptr. While the functions from those modules use native byte order, the functions in this one use big-endian byte order (most significant byte first).

  • 3 values

Aligned

3 declarations
valuewriteOffPtr :: (PrimMonad m, Prim a, Bytes a) => Ptr a -> Int -> a -> m ()
#

Write a primitive value to the pointer. The offset is given in elements of type a rather than in bytes. The most significant byte in the value comes first.

valuereadOffPtr :: (PrimMonad m, Prim a, Bytes a) => Ptr a -> Int -> m a
#

Read a primitive value from the pointer, interpreting the first byte as the most significant one. The offset is given in elements of type a rather than in bytes.

valueindexOffPtr :: (Prim a, Bytes a) => Ptr a -> Int -> a
#

Read a primitive value from the pointer, interpreting the first byte as the most significant one. The offset is given in elements of type a rather than in bytes.