AndrasKovacs / flatparse

Fast parsing from bytestrings
MIT License
146 stars 12 forks source link

Alternative and MonadPlus instances? #11

Closed cdsmith closed 1 year ago

cdsmith commented 3 years ago

I don't see anything about why FlatParse is missing Alternative, MonadFail, and MonadPlus instances. Could these be added?

AndrasKovacs commented 3 years ago

They're not added right now because <|> associates in the wrong direction (left, should be right in this library). We could add them, and reassociate with an early phase REWRITE rule.