@@ -53,6 +53,9 @@ import qualified Control.Monad.Fail as Fail
5353import qualified Streamly.Internal.Data.Array.Type as Array
5454import qualified Streamly.Internal.Data.Parser.ParserD.Type as ParserD
5555
56+-- Note: We cannot use an Array directly as input because we need to identify
57+-- the end of input case using None. We cannot do that using nil Array as nil
58+-- Arrays can be encountered in normal input as well.
5659data Input a = None | Chunk {-# UNPACK #-} !(Array a)
5760
5861-- | The intermediate result of running a parser step. The parser driver may
@@ -142,7 +145,6 @@ newtype ParserK a m b = MkParser
142145 -- The second argument is the used count as described above. The
143146 -- current input position is carried as part of 'Success'
144147 -- constructor of 'ParseResult'.
145− -- XXX Use Array a, determine eof by using a nil array
146148 -> Input a
147149 -> m (Step a m r)
148150 }