From e8d31fc642ba77c96b1e34383d6a9cb425c2425f 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') diff --git a/src/Data/Array/Nested/Mixed/Shape.hs b/src/Data/Array/Nested/Mixed/Shape.hs index 77256ab..0801550 100644 --- a/src/Data/Array/Nested/Mixed/Shape.hs +++ b/src/Data/Array/Nested/Mixed/Shape.hs @@ -435,6 +435,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