HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleunicode-data-0.4.0.1Haskell2010

Unicode.Internal.Bits

Fast, static bitmap lookup utilities

  • 2 values
valuelookupBit64 :: Addr# -> Int -> Bool
#

lookup64 addr index looks up the bit stored at bit index index using a bitmap starting at the address addr. Looks up the 64-bit word containing the bit and then the bit in that word. The caller must make sure that the 64-bit word at the byte address (addr + index / 64) * 8 is legally accessible memory.

valuelookupIntN
  1. :: Addr#

    Bitmap address

  2. -> Int

    Word index

  3. -> Int

    Resulting word as Int

#

lookupIntN addr index looks up for the index-th 8-bits word in the bitmap starting at addr, then convert it to an Int.

The caller must make sure that:

  • ceiling (addr + (n * 8)) is legally accessible Word8.