From 8579a03c5ae8f4812b72d477251a614d820dd1fc Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Sun, 14 Dec 2025 23:12:30 +0100 Subject: Implement shxFromShS and shsFromShX as a newtype coerce --- src/Data/Array/Nested/Mixed/Shape.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Data/Array/Nested/Mixed/Shape.hs') diff --git a/src/Data/Array/Nested/Mixed/Shape.hs b/src/Data/Array/Nested/Mixed/Shape.hs index 3f4ee9a..f08b8be 100644 --- a/src/Data/Array/Nested/Mixed/Shape.hs +++ b/src/Data/Array/Nested/Mixed/Shape.hs @@ -434,6 +434,7 @@ shxToList list = build (\(cons :: i -> is -> is) (nil :: is) -> go (smn :$% sh) = fromSMayNat' smn `cons` go sh in go list) +-- If it ever matters for performance, this is unsafeCoercible. shxFromSSX :: StaticShX (MapJust sh) -> ShX (MapJust sh) i shxFromSSX ZKX = ZSX shxFromSSX (SKnown n :!% sh :: StaticShX (MapJust sh)) -- cgit v1.2.3-70-g09d2