diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-14 23:12:30 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2026-03-15 10:35:24 +0100 |
| commit | 28246aa67f447f18a2bcd59d04bd0962c4d258bc (patch) | |
| tree | f3cba96c7b77fa64a20bc9f1c39125f7e09f6b94 /src/Data/Array/Nested/Mixed/Shape.hs | |
| parent | 01a79440952d789184101fc1aad277c00d010a25 (diff) | |
Implement shxFromShS and shsFromShX as a newtype coerce
Diffstat (limited to 'src/Data/Array/Nested/Mixed/Shape.hs')
| -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 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)) |
