From 0c993d875a7cb9bace8aea1ef6def200de6b7d51 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Tue, 13 May 2025 17:30:44 +0200 Subject: Fix some of the warnings GHC 9.12.2 now produces --- test/Gen.hs | 4 ++-- test/Util.hs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test') 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) = -- cgit v1.2.3-70-g09d2