aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested/Mixed
diff options
context:
space:
mode:
authorMikolaj Konarski <mikolaj.konarski@funktory.com>2025-12-14 23:12:30 +0100
committerMikolaj Konarski <mikolaj.konarski@funktory.com>2026-03-15 10:35:24 +0100
commit28246aa67f447f18a2bcd59d04bd0962c4d258bc (patch)
treef3cba96c7b77fa64a20bc9f1c39125f7e09f6b94 /src/Data/Array/Nested/Mixed
parent01a79440952d789184101fc1aad277c00d010a25 (diff)
Implement shxFromShS and shsFromShX as a newtype coerce
Diffstat (limited to 'src/Data/Array/Nested/Mixed')
-rw-r--r--src/Data/Array/Nested/Mixed/Shape.hs1
1 files changed, 1 insertions, 0 deletions
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))