| Copyright | (C) 2025-2026 QBayLogic B.V. |
|---|---|
| License | BSD2 (see the file LICENSE) |
| Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Clash.Shockwaves.Internal.BitList
Description
Dynamically sized bitvectors.
Synopsis
- data BitList = BL {
- unsafeMask :: !Natural
- unsafeToNatural :: !Natural
- bitLength :: !Int
- length :: BitList -> Int
- bvToBl :: forall (n :: Nat). KnownNat n => BitVector n -> BitList
- blToBv :: forall (n :: Nat). KnownNat n => BitList -> BitVector n
- pack :: BitPack a => a -> BitList
- unpack :: BitPack a => BitList -> a
- drop :: Int -> BitList -> BitList
- take :: Int -> BitList -> BitList
- split :: Int -> BitList -> (BitList, BitList)
- concat :: BitList -> BitList -> BitList
- slice :: (Int, Int) -> BitList -> BitList
- toInteger :: BitList -> Maybe Integer
- hasUndefined :: BitList -> Bool
- mask :: Int -> Natural
Documentation
A type like BitVector, but with a dynamic size.
It is meant to make type-independent handling of binary representations possible.
Constructors
| BL | |
Fields
| |
Instances
split :: Int -> BitList -> (BitList, BitList) Source #
Split a BitList into the n most significant bits,
and the rest of the bits
hasUndefined :: BitList -> Bool Source #