haskell / attoparsec

A fast Haskell library for parsing ByteStrings
http://hackage.haskell.org/package/attoparsec
Other
512 stars 93 forks source link

Use Data.Foldable.asum for Combinator.choice #169

Closed sinogermany closed 3 years ago

sinogermany commented 4 years ago

I was reading through the code and realised this:

Parser is already an Alternative, so choice is effectively asum

They have exactly the same implementation, so we can use it directly instead of re-implementing it.