Skip to content

Commit

Permalink
Add note about non-incremental parsing of readHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitsutoshi Aoe committed Apr 8, 2017
1 parent d3a2789 commit 53f2872
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/GHC/RTS/Events/Incremental.hs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ decodeEventLog = withHeader $ \header leftover ->

-- | Read a header from a lazy bytestring and return the header and the
-- leftover input for subsequent decoding.
--
-- Note that the input must contain a whole header in one go. If incremental
-- parsing of a header is necessary, use 'decodeHeader' instead.
readHeader :: BL.ByteString -> Either String (Header, BL.ByteString)
readHeader = go $ Left decodeHeader
where
Expand Down

0 comments on commit 53f2872

Please sign in to comment.