From f2cec69969a68e8feed3dceacef5186b1debdda5 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Tue, 16 Dec 2025 09:51:51 +0100 Subject: Make ShR a newtype over ShX --- src/Data/Array/Nested/Permutation.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Data/Array/Nested/Permutation.hs') 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) -- cgit v1.2.3-70-g09d2