type-unary 0.2.4 → 0.2.5
raw patch · 2 files changed
+4/−4 lines, 2 filesdep ~base
Dependency ranges changed: base
Files
- src/TypeUnary/Nat.hs +3/−3
- type-unary.cabal +1/−1
src/TypeUnary/Nat.hs view
@@ -245,13 +245,13 @@ -- | Index generation from integer. Can fail dynamically if the integer is -- too large.-coerceToIndex :: (Show i, Num i, IsNat m) => i -> Index m+coerceToIndex :: (Eq i, Show i, Num i, IsNat m) => i -> Index m coerceToIndex = coerceToIndex' nat -coerceToIndex' :: (Show i, Num i) => Nat m -> i -> Index m+coerceToIndex' :: (Eq i, Show i, Num i) => Nat m -> i -> Index m coerceToIndex' mOrig niOrig = loop mOrig niOrig where- loop :: (Show i, Num i) => Nat m -> i -> Index m+ loop :: (Eq i, Show i, Num i) => Nat m -> i -> Index m loop Zero _ = error $ "coerceToIndex: out of bounds: " ++ show niOrig ++ " should be less than " ++ show mOrig
type-unary.cabal view
@@ -1,5 +1,5 @@ Name: type-unary-Version: 0.2.4+Version: 0.2.5 Cabal-Version: >= 1.6 Synopsis: Type-level and typed unary natural numbers, inequality proofs, vectors