aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMikolaj Konarski <mikolaj.konarski@funktory.com>2025-05-13 17:30:44 +0200
committerMikolaj Konarski <mikolaj.konarski@funktory.com>2025-05-13 17:30:44 +0200
commit0c993d875a7cb9bace8aea1ef6def200de6b7d51 (patch)
tree75e9a8c925a5bb4523d95f7f7e4a9794446b42a1 /test
parentca78d92aa55e9ba8ad179ef42515e4e7b2b8155a (diff)
Fix some of the warnings GHC 9.12.2 now produces
Diffstat (limited to 'test')
-rw-r--r--test/Gen.hs4
-rw-r--r--test/Util.hs2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/Gen.hs b/test/Gen.hs
index 8099f0d..ae1d1f0 100644
--- a/test/Gen.hs
+++ b/test/Gen.hs
@@ -98,7 +98,7 @@ genReplicatedShR = \m n -> do
(sh2, sh3) <- injectOnes n sh1 sh1
return (sh1, sh2, sh3)
where
- injectOnes :: m <= n => SNat n -> IShR m -> IShR m -> Gen (IShR n, IShR n)
+ injectOnes :: SNat n -> IShR m -> IShR m -> Gen (IShR n, IShR n)
injectOnes n@SNat shOnes sh
| m@SNat <- shrRank sh
= case cmpNat n m of
@@ -110,7 +110,7 @@ genReplicatedShR = \m n -> do
Refl <- return (lem n m)
injectOnes n (inject index 1 shOnes) (inject index value sh)
- lem :: forall n m proxy. Compare n m ~ GT => proxy n -> proxy m -> (m + 1 <=? n) :~: True
+ lem :: forall n m proxy. proxy n -> proxy m -> (m + 1 <=? n) :~: True
lem _ _ = unsafeCoerceRefl
inject :: Int -> Int -> IShR m -> IShR (m + 1)
diff --git a/test/Util.hs b/test/Util.hs
index 7c06b2f..34cf8ab 100644
--- a/test/Util.hs
+++ b/test/Util.hs
@@ -42,7 +42,7 @@ class AlmostEq f where
almostEq :: (AlmostEqConstr f a, Ord a, Show a, Fractional a, MonadTest m)
=> a -> f a -> f a -> m ()
-instance KnownNat n => AlmostEq (OR.Array n) where
+instance AlmostEq (OR.Array n) where
type AlmostEqConstr (OR.Array n) = OR.Unbox
almostEq atol lhs rhs
| OR.allA (< atol) (OR.zipWithA (\a b -> abs (a - b)) rhs lhs) =