Skip to content

Commit

Permalink
Allow primMapListBounded to inline with one arg
Browse files Browse the repository at this point in the history
  • Loading branch information
clyring committed Feb 15, 2024
1 parent 2603009 commit cd02c61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Data/ByteString/Builder/Prim.hs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,10 @@ primBounded w x =
-- because it moves several variables out of the inner loop.
{-# INLINE primMapListBounded #-}
primMapListBounded :: BoundedPrim a -> [a] -> Builder
primMapListBounded w xs0 =
primMapListBounded w = \xs0 ->
-- We want this to inline when there is one arg, so that we can
-- specialise on the BoundedPrim "w". So we move the \xs0 after the
-- "=" sign so that the INLINE pragma doesn't interfere with this.
builder $ step xs0
where
step xs1 k (BufferRange op0 ope0) =
Expand Down

0 comments on commit cd02c61

Please sign in to comment.