Skip to content

Commit 8d442b3

Browse files
committed
Address review comments
1 parent 76b3bf1 commit 8d442b3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
ADDED: `Index 0` instances for `BitPack`, `Bits`, `Counter`, `FiniteBits`, `MaybeNumConvert`, `NumConvert`, `Partiy`, and `SaturatingNum`.
1+
ADDED: `Index 0` instances for `BitPack`, `Bits`, `Counter`, `FiniteBits`, `Parity`, and `SaturatingNum`.
22
ADDED: Zero-sized block RAM implementations for `blockRam1` and `blockRamU`.
3+
ADDED: `Counter a => Counter (Vec 0 a)` instance.

clash-prelude/src/Clash/Class/NumConvert/Internal/MaybeNumConvert.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import Clash.Sized.Index
2727
import Clash.Sized.Signed
2828
import Clash.Sized.Unsigned
2929

30-
import GHC.TypeLits (KnownNat, type (+), type (<=), type (^))
30+
import GHC.TypeLits (KnownNat, type (+), type (^))
3131
import GHC.TypeLits.Extra (CLogWZ)
3232

3333
{- $setup
@@ -110,7 +110,7 @@ instance (KnownNat n, KnownNat m) => MaybeNumConvertCanonical (Index n) (Unsigne
110110
instance (KnownNat n, KnownNat m) => MaybeNumConvertCanonical (Index n) (Signed m) where
111111
maybeNumConvertCanonical !a = maybeNumConvertCanonical $ bitCoerce @_ @(Unsigned (CLogWZ 2 n 0)) a
112112

113-
instance (KnownNat n, KnownNat m, 1 <= n) => MaybeNumConvertCanonical (Index n) (BitVector m) where
113+
instance (KnownNat n, KnownNat m) => MaybeNumConvertCanonical (Index n) (BitVector m) where
114114
maybeNumConvertCanonical !a = maybeResize $ pack a
115115

116116
instance (KnownNat n, KnownNat m) => MaybeNumConvertCanonical (Unsigned n) (Index m) where

0 commit comments

Comments
 (0)