@@ -61,7 +61,7 @@ import qualified Streamly.Internal.Data.Array as A
6161import qualified Streamly.Internal.Data.Parser as PR
6262 (fromPure , either , satisfy , takeEQ )
6363import qualified Streamly.Internal.Data.Parser as PRD
64- (Parser (.. ), Initial (.. ), Step (.. ))
64+ (Parser (.. ), Initial (.. ), Step (.. ), Final ( .. ) )
6565
6666-- Note: The () type does not need to have an on-disk representation in theory.
6767-- But we use a concrete representation for it so that we count how many ()
@@ -153,7 +153,7 @@ word16beD = PRD.Parser step initial extract
153153 step (Just' w) a =
154154 return $ PRD. SDone 1 (w .|. fromIntegral a)
155155
156- extract _ = return $ PRD. Error " word16be: end of input"
156+ extract _ = return $ PRD. FError " word16be: end of input"
157157
158158-- | Parse two bytes as a 'Word16', the first byte is the MSB of the Word16 and
159159-- second byte is the LSB (big endian representation).
@@ -178,7 +178,7 @@ word16leD = PRD.Parser step initial extract
178178 step (Just' w) a =
179179 return $ PRD. SDone 1 (w .|. fromIntegral a `unsafeShiftL` 8 )
180180
181- extract _ = return $ PRD. Error " word16le: end of input"
181+ extract _ = return $ PRD. FError " word16le: end of input"
182182
183183-- | Parse two bytes as a 'Word16', the first byte is the LSB of the Word16 and
184184-- second byte is the MSB (little endian representation).
@@ -205,7 +205,7 @@ word32beD = PRD.Parser step initial extract
205205 in PRD. SContinue 1 (Tuple' w1 (sh - 8 ))
206206 else PRD. SDone 1 (w .|. fromIntegral a)
207207
208- extract _ = return $ PRD. Error " word32beD: end of input"
208+ extract _ = return $ PRD. FError " word32beD: end of input"
209209
210210-- | Parse four bytes as a 'Word32', the first byte is the MSB of the Word32
211211-- and last byte is the LSB (big endian representation).
@@ -231,7 +231,7 @@ word32leD = PRD.Parser step initial extract
231231 then PRD. SContinue 1 (Tuple' w1 (sh + 8 ))
232232 else PRD. SDone 1 w1
233233
234- extract _ = return $ PRD. Error " word32leD: end of input"
234+ extract _ = return $ PRD. FError " word32leD: end of input"
235235
236236-- | Parse four bytes as a 'Word32', the first byte is the MSB of the Word32
237237-- and last byte is the LSB (big endian representation).
@@ -258,7 +258,7 @@ word64beD = PRD.Parser step initial extract
258258 in PRD. SContinue 1 (Tuple' w1 (sh - 8 ))
259259 else PRD. SDone 1 (w .|. fromIntegral a)
260260
261- extract _ = return $ PRD. Error " word64beD: end of input"
261+ extract _ = return $ PRD. FError " word64beD: end of input"
262262
263263-- | Parse eight bytes as a 'Word64', the first byte is the MSB of the Word64
264264-- and last byte is the LSB (big endian representation).
@@ -284,7 +284,7 @@ word64leD = PRD.Parser step initial extract
284284 then PRD. SContinue 1 (Tuple' w1 (sh + 8 ))
285285 else PRD. SDone 1 w1
286286
287- extract _ = return $ PRD. Error " word64leD: end of input"
287+ extract _ = return $ PRD. FError " word64leD: end of input"
288288
289289-- | Parse eight bytes as a 'Word64', the first byte is the MSB of the Word64
290290-- and last byte is the LSB (big endian representation).
0 commit comments