Skip to content

Commit f95581b

Browse files
committed
Mark many in Alternative instance as INLINEABLE
Since many is recursive ghc will never inline it. Even if we mark as INLINE. However ghc will complain if we compile with core lint enabled. So we just mark it as INLINEABLE instead.
1 parent 6af054b commit f95581b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Data/Binary/Get/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ instance Alternative Get where
282282
case v of
283283
Nothing -> pure []
284284
Just x -> (:) x <$> many p
285-
{-# INLINE many #-}
285+
{-# INLINEABLE many #-} -- many will never inline because it's recursive, so mark it INLINEABLE instead.
286286

287287
-- | Run a decoder and keep track of all the input it consumes.
288288
-- Once it's finished, return the final decoder (always 'Done' or 'Fail'),

0 commit comments

Comments
 (0)