aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested/Permutation.hs
diff options
context:
space:
mode:
authorMikolaj Konarski <mikolaj.konarski@funktory.com>2025-12-16 09:51:51 +0100
committerMikolaj Konarski <mikolaj.konarski@funktory.com>2025-12-16 09:55:27 +0100
commitf2cec69969a68e8feed3dceacef5186b1debdda5 (patch)
tree5dd2f491018c9c770faeaa8a7d21a26fc6f8d4fd /src/Data/Array/Nested/Permutation.hs
parent16e03fbb6d99bf97c8f73980f70de88e5e638306 (diff)
Make ShR a newtype over ShX
Diffstat (limited to 'src/Data/Array/Nested/Permutation.hs')
-rw-r--r--src/Data/Array/Nested/Permutation.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Data/Array/Nested/Permutation.hs b/src/Data/Array/Nested/Permutation.hs
index 2e0c1ca..c3d2075 100644
--- a/src/Data/Array/Nested/Permutation.hs
+++ b/src/Data/Array/Nested/Permutation.hs
@@ -214,8 +214,8 @@ ssxDropLen = coerce (listhDropLen @())
ssxPermute :: Perm is -> StaticShX sh -> StaticShX (Permute is sh)
ssxPermute = coerce (listhPermute @())
-ssxIndex :: SNat i -> StaticShX sh -> SMayNat () (Index i sh)
-ssxIndex i = coerce (listhIndex @() i)
+ssxIndex :: SNat k -> StaticShX sh -> SMayNat () (Index k sh)
+ssxIndex k = coerce (listhIndex @() k)
ssxPermutePrefix :: Perm is -> StaticShX sh -> StaticShX (PermutePrefix is sh)
ssxPermutePrefix = coerce (listhPermutePrefix @())
@@ -229,8 +229,8 @@ shxDropLen = coerce (listhDropLen @Int)
shxPermute :: Perm is -> IShX sh -> IShX (Permute is sh)
shxPermute = coerce (listhPermute @Int)
-shxIndex :: SNat i -> IShX sh -> SMayNat Int (Index i sh)
-shxIndex i = coerce (listhIndex @Int i)
+shxIndex :: forall k sh i. SNat k -> ShX sh i -> SMayNat i (Index k sh)
+shxIndex k = coerce (listhIndex @i k)
shxPermutePrefix :: Perm is -> IShX sh -> IShX (PermutePrefix is sh)
shxPermutePrefix = coerce (listhPermutePrefix @Int)