git.iko.soy/typeable/attoparsec
on master help sign in
Force inlining of Buffer mempty and mappend

Just to make sure.

commit6ccfe88b8c1580fcae61953824aebd29d21a87b8 authorBen Gamari <ben@smart-cactus.org> dateWed 6 Apr 2016, 11:39 (11 years ago) parentb0da92b
1 file changed+2
Data/Attoparsec/Text/Buffer.hs+2
Data/Attoparsec/Text/Buffer.hs+2
@@ -82,10 +82,12 @@ unbufferAt s (Buf arr off len _ _) =
8282
8383instance Monoid Buffer where
8484 mempty = Buf A.empty 0 0 0 0
85+ {-# INLINE mempty #-}
8586
8687 mappend (Buf _ _ _ 0 _) b = b
8788 mappend a (Buf _ _ _ 0 _) = a
8889 mappend buf (Buf arr off len _ _) = append buf arr off len
90+ {-# INLINE mappend #-}
8991
9092 mconcat [] = mempty
9193 mconcat xs = foldl1' mappend xs