Skip to content

Commit

Permalink
Add Functor instance for Extract
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Oct 22, 2024
1 parent d6c821b commit 461b4db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ReadHandle.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ newEmptyBuffer = newIORef BufferEmpty
data Extract a = Extract {
isPartialMessage :: ByteString -> Bool
, parseMessage :: ByteString -> Maybe (a, ByteString)
}
} deriving Functor

partialMessageStartsWith :: ByteString -> ByteString -> Bool
partialMessageStartsWith prefix chunk = ByteString.isPrefixOf chunk prefix || ByteString.isPrefixOf prefix chunk
Expand Down

0 comments on commit 461b4db

Please sign in to comment.