diff options
author | Tom Smeding <tom@tomsmeding.com> | 2025-05-13 19:58:36 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2025-05-13 20:08:03 +0200 |
commit | edffb586e99b4846d67c396e05f7adc13ac87cf4 (patch) | |
tree | ed138129bec32831d98af46aadc64c187951c01b /test/Gen.hs | |
parent | bda0d3e9c1752d35488665ec19d39904f0dc4b49 (diff) |
Some constraints look redundant to GHC, but are not
Diffstat (limited to 'test/Gen.hs')
-rw-r--r-- | test/Gen.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Gen.hs b/test/Gen.hs index ae1d1f0..bf002ca 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 :: SNat n -> IShR m -> IShR m -> Gen (IShR n, IShR n) + injectOnes :: m <= n => 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. proxy n -> proxy m -> (m + 1 <=? n) :~: True + lem :: forall n m proxy. n > m => proxy n -> proxy m -> (m + 1 <=? n) :~: True lem _ _ = unsafeCoerceRefl inject :: Int -> Int -> IShR m -> IShR (m + 1) |