diff options
Diffstat (limited to 'src/Data/Array/Nested/Ranked/Shape.hs')
| -rw-r--r-- | src/Data/Array/Nested/Ranked/Shape.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Data/Array/Nested/Ranked/Shape.hs b/src/Data/Array/Nested/Ranked/Shape.hs index 989d7d1..739f0de 100644 --- a/src/Data/Array/Nested/Ranked/Shape.hs +++ b/src/Data/Array/Nested/Ranked/Shape.hs @@ -79,6 +79,9 @@ instance Foldable (ListR n) where {-# INLINE foldr #-} foldr _ z ZR = z foldr f z (x ::: xs) = f x (foldr f z xs) + {-# INLINEABLE toList #-} + toList ZR = [] + toList (i ::: is) = i : Foldable.toList is null ZR = False null _ = True |
