@@ -69,6 +69,7 @@ module Streamly.Internal.Data.Parser
6969
7070 -- * Element parsers
7171 , peek
72+ , one
7273 , eof
7374 , satisfy
7475 , next
@@ -392,6 +393,16 @@ eof = D.toParserK D.eof
392393satisfy :: MonadCatch m => (a -> Bool) -> Parser m a a
393394satisfy = D.toParserK . D.satisfy
394395
396+-- | Consume one element from the head of the stream. Fails if it encounters
397+-- end of input.
398+--
399+-- >>> one = satisfy $ const True
400+--
401+-- /Pre-release/
402+--
403+one :: MonadCatch m => Parser m a a
404+one = satisfy $ const True
405+
395406-- | Return the next element of the input. Returns 'Nothing'
396407-- on end of input. Also known as 'head'.
397408--