on master help sign in
Builder: Defer inlining of flush to phase 1

Otherwise the flush/flush rule may not have an opportunity to fire.

commitffa98130f7ec119b2fe671f39c8114b9760c5500 authorBen Gamari <ben@smart-cactus.org> dateWed 30 Mar 2016, 11:28 (11 years ago) parent0fd610a
1 file changed+2
Data/Text/Internal/Builder.hs+2
Data/Text/Internal/Builder.hs+2
@@ -242,6 +242,8 @@ flush = Builder $ \ k buf@(Buffer p o u l) ->
242242 !t = Text arr o u
243243 ts <- inlineInterleaveST (k b)
244244 return $! t : ts
245+{-# INLINE [1] flush #-}
246+-- defer inlining so that flush/flush rule may fire.
245247
246248------------------------------------------------------------------------
247249