mirror of
https://github.com/ilyakooo0/optparse-applicative.git
synced 2024-09-19 06:28:23 +03:00
Fix implementation of some
for BConst
The default implementation diverges for `Alt` parsers
This commit is contained in:
parent
8eaf1d1078
commit
37fe3df3bf
@ -47,3 +47,6 @@ instance Monoid m => Applicative (BConst m) where
|
||||
instance StarBimonoid m => Alternative (BConst m) where
|
||||
empty = BConst zero
|
||||
x <|> y = BConst $ getBConst x `plus` getBConst y
|
||||
|
||||
some = BConst . star . getBConst
|
||||
many x = some x <|> pure []
|
||||
|
Loading…
Reference in New Issue
Block a user