@@ -136,7 +136,7 @@ infixr 3 asErrorMessage as <??>
136136between :: forall m s a open close . ParserT s m open -> ParserT s m close -> ParserT s m a -> ParserT s m a
137137between open close p = open *> p <* close
138138
139- -- | Provide a default result in the case where a parser fails without consuming input .
139+ -- | Provide a default result in the case where a parser fails without consuming.
140140option :: forall m s a . a -> ParserT s m a -> ParserT s m a
141141option a p = p <|> pure a
142142
@@ -146,11 +146,11 @@ option a p = p <|> pure a
146146optional :: forall m s a . ParserT s m a -> ParserT s m Unit
147147optional p = void p <|> pure unit
148148
149- -- | pure `Nothing` in the case where a parser fails without consuming input .
149+ -- | pure `Nothing` in the case where a parser fails without consuming.
150150optionMaybe :: forall m s a . ParserT s m a -> ParserT s m (Maybe a )
151151optionMaybe p = option Nothing (Just <$> p)
152152
153- -- | If the parser fails then backtrack the input stream to the unconsumed state.
153+ -- | If the parser fails then backtrack the input stream and reset to the unconsumed state.
154154-- |
155155-- | One use for this combinator is to ensure that the right parser of an
156156-- | alternative will always be tried when the left parser fails.
@@ -173,7 +173,7 @@ try (ParserT k1) = ParserT
173173 done
174174 )
175175
176- -- | If the parser fails then backtrack the input stream to the unconsumed state.
176+ -- | If the parser fails then backtrack the input stream and reset to the unconsumed state.
177177-- |
178178-- | Like `try`, but will reposition the error to the `try` point.
179179-- |
@@ -209,7 +209,7 @@ lookAhead (ParserT k1) = ParserT
209209-- |
210210-- | Will match until the phrase `p` fails *without consuming*.
211211-- |
212- -- | If the phrase `p` fails after consuming input then the `many` will fail.
212+ -- | If the phrase `p` fails after consuming then the `many` will fail.
213213-- |
214214-- | If the phrase `p` is wrapped in `try` then it will never consume.
215215-- | If phrase `p` never consumes then `many p` will always succeed,
@@ -375,7 +375,7 @@ skipMany1 p = p *> tailRecM go unit
375375
376376-- | Fail if the parser succeeds.
377377-- |
378- -- | Will never consume input .
378+ -- | Will never consume.
379379notFollowedBy :: forall s a m . ParserT s m a -> ParserT s m Unit
380380notFollowedBy p = try $ (try p *> fail " Negated parser succeeded" ) <|> pure unit
381381
0 commit comments