| 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.BitList
Description
Various functions for dealing with dynamically sized binary representations of data.
Synopsis
- data BitList
- take :: Int -> BitList -> BitList
- drop :: Int -> BitList -> BitList
- split :: Int -> BitList -> (BitList, BitList)
- concat :: BitList -> BitList -> BitList
- slice :: (Int, Int) -> BitList -> BitList
- 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
- toInteger :: BitList -> Maybe Integer
- hasUndefined :: BitList -> Bool
Documentation
A type like BitVector, but with a dynamic size.
It is meant to make type-independent handling of binary representations possible.
Instances
Modifying BitLists
split :: Int -> BitList -> (BitList, BitList) Source #
Split a BitList into the n most significant bits,
and the rest of the bits
Using BitList with BitVector
Using BitList as a number
Rest
hasUndefined :: BitList -> Bool Source #