diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-14 23:12:30 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-15 00:57:40 +0100 |
| commit | 5c85e5d5b6357ac3eb7a54ab6e7eccdc987004fa (patch) | |
| tree | 57d29f95ef3813b72e9a5e3375926286ab20910d /src/Data/Array/Nested/Mixed | |
| parent | 6e841f3e7d19253db65874d87e2277c050dad984 (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.hs | 1 |
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 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)) |
