aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested/Shaped/Base.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Array/Nested/Shaped/Base.hs')
-rw-r--r--src/Data/Array/Nested/Shaped/Base.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Data/Array/Nested/Shaped/Base.hs b/src/Data/Array/Nested/Shaped/Base.hs
index a24a91a..879e6b5 100644
--- a/src/Data/Array/Nested/Shaped/Base.hs
+++ b/src/Data/Array/Nested/Shaped/Base.hs
@@ -249,12 +249,7 @@ sshape (Shaped arr) = shsFromShX (mshape arr)
shsFromShX :: forall sh i. ShX (MapJust sh) i -> ShS sh
shsFromShX ZSX = castWith (subst1 (unsafeCoerceRefl :: '[] :~: sh)) ZSS
shsFromShX (SKnown n@SNat :$% (idx :: ShX mjshT i)) =
- castWith (subst1 (lem Refl)) $
+ castWith (subst1 (sym (lemMapJustCons Refl))) $
n :$$ shsFromShX @(Tail sh) (castWith (subst2 (unsafeCoerceRefl :: mjshT :~: MapJust (Tail sh)))
idx)
- where
- lem :: forall sh1 sh' n.
- Just n : sh1 :~: MapJust sh'
- -> n : Tail sh' :~: sh'
- lem Refl = unsafeCoerceRefl
shsFromShX (SUnknown _ :$% _) = error "impossible"