@@ -195,7 +195,7 @@ import Prelude hiding (concatMap)
195data Initial s b
195data Initial s b
196 = IPartial !s -- ^ Wait for step function to be called with state @s@.
196 = IPartial !s -- ^ Wait for step function to be called with state @s@.
197 | IDone !b -- ^ Return a result right away without an input.
197 | IDone !b -- ^ Return a result right away without an input.
198− | IError String -- ^ Return an error right away without an input.
198+ | IError !String -- ^ Return an error right away without an input.
200-- | @first@ maps on 'IPartial' and @second@ maps on 'IDone'.
200-- | @first@ maps on 'IPartial' and @second@ maps on 'IDone'.
@@ -272,7 +272,7 @@ instance Functor (Initial s) where
273{-# ANN type Step Fuse #-}
273{-# ANN type Step Fuse #-}
274data Step s b =
274data Step s b =
275− Partial Int s
275+ Partial !Int !s
276 -- ^ Partial result with an optional backtrack request.
276 -- ^ Partial result with an optional backtrack request.
278 -- @Partial count state@ means a partial result is available which
278 -- @Partial count state@ means a partial result is available which
@@ -281,7 +281,7 @@ data Step s b =
281 -- The current input position is reset to @count@ elements back and any
281 -- The current input position is reset to @count@ elements back and any
282 -- input before that is dropped from the backtrack buffer.
282 -- input before that is dropped from the backtrack buffer.
284− | Continue Int s
284+ | Continue !Int !s
285 -- ^ Need more input with an optional backtrack request.
285 -- ^ Need more input with an optional backtrack request.
287 -- @Continue count state@ means the parser has consumed the current input
287 -- @Continue count state@ means the parser has consumed the current input
@@ -289,14 +289,14 @@ data Step s b =
289 -- The current input is retained in the backtrack buffer and the input
289 -- The current input is retained in the backtrack buffer and the input
290 -- position is reset to @count@ elements back.
290 -- position is reset to @count@ elements back.
292− | Done Int b
292+ | Done !Int !b
293 -- ^ Done with leftover input count and result.
293 -- ^ Done with leftover input count and result.
295 -- @Done count result@ means the parser has finished, it will accept no
295 -- @Done count result@ means the parser has finished, it will accept no
296 -- more input, last @count@ elements from the input are unused and the
296 -- more input, last @count@ elements from the input are unused and the
297 -- result of the parser is in @result@.
297 -- result of the parser is in @result@.
299− | Error String
299+ | Error !String
300 -- ^ Parser failed without generating any output.
300 -- ^ Parser failed without generating any output.
302 -- The parsing operation may backtrack to the beginning and try another
302 -- The parsing operation may backtrack to the beginning and try another