aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Mixed/Shape.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-06-03 19:56:57 +0200
committerTom Smeding <tom@tomsmeding.com>2024-06-03 19:56:57 +0200
commitac061cf450b1c8e153de06f7b12256914c496788 (patch)
tree6774c5752674d749518986d575f64ce95728568f /src/Data/Array/Mixed/Shape.hs
parenta25d4061e219cec153f066fddbf710abd63b5e48 (diff)
rrank, rtoOrthotope
Diffstat (limited to 'src/Data/Array/Mixed/Shape.hs')
-rw-r--r--src/Data/Array/Mixed/Shape.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Data/Array/Mixed/Shape.hs b/src/Data/Array/Mixed/Shape.hs
index 4ab3c26..4343574 100644
--- a/src/Data/Array/Mixed/Shape.hs
+++ b/src/Data/Array/Mixed/Shape.hs
@@ -252,6 +252,9 @@ instance NFData i => NFData (ShX sh i) where
shxLength :: ShX sh i -> Int
shxLength (ShX l) = listxLength l
+shxLengthSNat :: ShX sh f -> SNat (Rank sh)
+shxLengthSNat (ShX list) = listxLengthSNat list
+
-- | This is more than @geq@: it also checks that the integers (the unknown
-- dimensions) are the same.
shxEqual :: Eq i => ShX sh i -> ShX sh' i -> Maybe (sh :~: sh')