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

Modulebasement-0.0.16Haskell2010

Basement.Bits

  • 1 type
  • 2 classes
  • 2 values
  • Packagebasement-0.0.16
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceBits.hs
classclass BitOps bits where
#

operation over bits

Methods

Instances13BitOps, …
  • BitOps Word128Defined in basement-0.0.16 · Basement.Bits
  • BitOps Word256Defined in basement-0.0.16 · Basement.Bits
  • BitOps Int16Defined in basement-0.0.16 · Basement.Bits
  • BitOps Int32Defined in basement-0.0.16 · Basement.Bits
  • BitOps Int64Defined in basement-0.0.16 · Basement.Bits
  • BitOps Int8Defined in basement-0.0.16 · Basement.Bits
  • BitOps Word16Defined in basement-0.0.16 · Basement.Bits
  • BitOps Word32Defined in basement-0.0.16 · Basement.Bits
  • BitOps Word64Defined in basement-0.0.16 · Basement.Bits
  • BitOps Word8Defined in basement-0.0.16 · Basement.Bits
  • BitOps BoolDefined in basement-0.0.16 · Basement.Bits
  • BitOps WordDefined in basement-0.0.16 · Basement.Bits
  • SizeValid n => BitOps (Bits n)Defined in basement-0.0.16 · Basement.Bits
classclass FiniteBitsOps bits where
#

operation over finite bits

Methods

Instances13FiniteBitsOps, …
newtypenewtype Bits (n :: Nat)
#

Bool set of n bits.

Instances12Bounded, Enum, Eq, Ord, Show, BitOps, …
  • SizeValid n => Bounded (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • SizeValid n => Enum (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • Eq (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • Ord (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • Show (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • SizeValid n => BitOps (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • (SizeValid n, NatWithinBound (CountOf Bool) n) => FiniteBitsOps (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • SizeValid n => Additive (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • SizeValid n => IDivisible (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • SizeValid n => Multiplicative (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • SizeValid n => Subtractive (Bits n)Defined in basement-0.0.16 · Basement.Bits
  • type Difference (Bits n) = Bits nDefined in basement-0.0.16 · Basement.Bits
valuetoBits :: SizeValid n => Natural -> Bits n
#

convert the given Natural into a Bits of size n

if bits that are not within the boundaries of the 'Bits n' will be truncated.

valueallOne :: SizeValid n => Bits n
#

construct a Bits with all bits set.

this function is equivalet to maxBound