aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested/Ranked/Shape.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Array/Nested/Ranked/Shape.hs')
-rw-r--r--src/Data/Array/Nested/Ranked/Shape.hs17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/Data/Array/Nested/Ranked/Shape.hs b/src/Data/Array/Nested/Ranked/Shape.hs
index 6d94c8d..2166123 100644
--- a/src/Data/Array/Nested/Ranked/Shape.hs
+++ b/src/Data/Array/Nested/Ranked/Shape.hs
@@ -113,9 +113,6 @@ listrShow f l = showString "[" . go "" l . showString "]"
go _ ZR = id
go prefix (x ::: xs) = showString prefix . f x . go "," xs
-listrLength :: ListR n i -> Int
-listrLength = length
-
listrRank :: ListR n i -> SNat n
listrRank ZR = SNat
listrRank (_ ::: sh) = snatSucc (listrRank sh)
@@ -134,14 +131,6 @@ listrFromList topsn topl = go topsn topl
++ show (fromSNat topsn) ++ ", list has length "
++ show (length topl) ++ ")"
-{-# INLINEABLE listrToList #-}
-listrToList :: ListR n i -> [i]
-listrToList list = build (\(cons :: i -> is -> is) (nil :: is) ->
- let go :: ListR n i -> is
- go ZR = nil
- go (i ::: is) = i `cons` go is
- in go list)
-
listrHead :: ListR (n + 1) i -> i
listrHead (i ::: _) = i
@@ -237,9 +226,6 @@ instance Show i => Show (IxR n i) where
showsPrec _ (IxR l) = listrShow shows l
#endif
-ixrLength :: IxR sh i -> Int
-ixrLength (IxR l) = listrLength l
-
ixrRank :: IxR n i -> SNat n
ixrRank (IxR sh) = listrRank sh
@@ -251,9 +237,6 @@ ixrZero (SS n) = 0 :.: ixrZero n
ixrFromList :: forall n i. SNat n -> [i] -> IxR n i
ixrFromList = coerce (listrFromList @_ @i)
-ixrToList :: IxR n i -> [i]
-ixrToList = Foldable.toList
-
ixrHead :: IxR (n + 1) i -> i
ixrHead (IxR list) = listrHead list