Skip to content

Commit 130e338

Browse files
author
Benjamin
committed
inline existing functions for nonnull
1 parent 7723cc2 commit 130e338

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

mono-traversable/src/Data/NonNull.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,23 @@ instance GrowingAppend mono => GrowingAppend (NonNull mono)
7272

7373
instance (Semigroup mono, GrowingAppend mono) => Semigroup (NonNull mono) where
7474
(<>) = unsafeMap2 (<>)
75+
{-# INLINE (<>) #-}
7576

7677
instance SemiSequence seq => SemiSequence (NonNull seq) where
7778
type Index (NonNull seq) = Index seq
7879

7980
intersperse e = unsafeMap $ intersperse e
81+
{-# INLINE intersperse #-}
8082
reverse = unsafeMap reverse
83+
{-# INLINE reverse #-}
8184
find f = find f . toNullable
85+
{-# INLINE find #-}
8286
cons x = unsafeMap $ cons x
87+
{-# INLINE cons #-}
8388
snoc xs x = unsafeMap (flip snoc x) xs
89+
{-# INLINE snoc #-}
8490
sortBy f = unsafeMap $ sortBy f
91+
{-# INLINE sortBy #-}
8592

8693
instance SemiSetContainer set => SemiSetContainer (NonNull set) where
8794
type ContainerKey (NonNull set) = ContainerKey set

0 commit comments

Comments
 (0)