RetroClash.BCD
type Digit = Index 10 Source #
toDigit :: Unsigned 4 -> Digit Source #
type BCD n = Vec n Digit Source #
fromBCD :: BCD n -> Integer Source #
type BCDSize n = CLog 10 (2 ^ n) Source #
toBCD :: forall n. KnownNat n => Unsigned n -> BCD (BCDSize n) Source #
type ShiftAdd n = (Vec (BCDSize n) (Unsigned 4), Unsigned n) Source #
initBCD :: KnownNat n => Unsigned n -> ShiftAdd n Source #
stepBCD :: KnownNat n => ShiftAdd n -> ShiftAdd n Source #
prop_BCD :: KnownNat n => Unsigned n -> Bool Source #