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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

Modulebasement-0.0.16Haskell2010

Basement.Bits

Synopsis
  • 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 BoolDefined in basement-0.0.16 · Basement.Bits
  • BitOps WordDefined 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
  • 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.