Skip to content

Commit

Permalink
Fix isNull for L and LN
Browse files Browse the repository at this point in the history
  • Loading branch information
lehins committed Jul 31, 2021
1 parent 09b8d73 commit b6b5881
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions massiv/src/Data/Massiv/Core/List.hs
Expand Up @@ -140,7 +140,7 @@ instance Shape LN Ix2 where
{-# INLINE linearSize #-}
linearSizeHint = lengthHintList . unList
{-# INLINE linearSizeHint #-}
isNull = null . unList
isNull = getAll . foldMap (All . null . unList) . unList
{-# INLINE isNull #-}
outerSize arr =
case unList arr of
Expand All @@ -163,7 +163,7 @@ instance (Shape LN (Ix (n - 1)), Index (IxN n)) => Shape LN (IxN n) where
{-# INLINE linearSize #-}
linearSizeHint = lengthHintList . unList
{-# INLINE linearSizeHint #-}
isNull = null . unList
isNull = getAll . foldMap (All . isNull) . unList
{-# INLINE isNull #-}
outerSize arr =
case unList arr of
Expand Down

0 comments on commit b6b5881

Please sign in to comment.