@@ -136,7 +136,7 @@ infixr 3 asErrorMessage as <??>
136
136
between :: forall m s a open close . ParserT s m open -> ParserT s m close -> ParserT s m a -> ParserT s m a
137
137
between open close p = open *> p <* close
138
138
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.
140
140
option :: forall m s a . a -> ParserT s m a -> ParserT s m a
141
141
option a p = p <|> pure a
142
142
@@ -146,11 +146,11 @@ option a p = p <|> pure a
146
146
optional :: forall m s a . ParserT s m a -> ParserT s m Unit
147
147
optional p = void p <|> pure unit
148
148
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.
150
150
optionMaybe :: forall m s a . ParserT s m a -> ParserT s m (Maybe a )
151
151
optionMaybe p = option Nothing (Just <$> p)
152
152
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.
154
154
-- |
155
155
-- | One use for this combinator is to ensure that the right parser of an
156
156
-- | alternative will always be tried when the left parser fails.
@@ -173,7 +173,7 @@ try (ParserT k1) = ParserT
173
173
done
174
174
)
175
175
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.
177
177
-- |
178
178
-- | Like `try`, but will reposition the error to the `try` point.
179
179
-- |
@@ -209,7 +209,7 @@ lookAhead (ParserT k1) = ParserT
209
209
-- |
210
210
-- | Will match until the phrase `p` fails *without consuming*.
211
211
-- |
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.
213
213
-- |
214
214
-- | If the phrase `p` is wrapped in `try` then it will never consume.
215
215
-- | If phrase `p` never consumes then `many p` will always succeed,
@@ -375,7 +375,7 @@ skipMany1 p = p *> tailRecM go unit
375
375
376
376
-- | Fail if the parser succeeds.
377
377
-- |
378
- -- | Will never consume input .
378
+ -- | Will never consume.
379
379
notFollowedBy :: forall s a m . ParserT s m a -> ParserT s m Unit
380
380
notFollowedBy p = try $ (try p *> fail " Negated parser succeeded" ) <|> pure unit
381
381
0 commit comments