ollef / Earley

Parsing all context-free grammars using Earley's algorithm in Haskell.
BSD 3-Clause "New" or "Revised" License
361 stars 24 forks source link

Generalize `word`? #21

Closed sid-kap closed 8 years ago

sid-kap commented 8 years ago

Should word be generalized to

word :: (Eq t, ListLike i t) => i -> Prod r e t i

instead of

word :: Eq t => [t] -> Prod r e t [t]

? This would make it easier to use values of type Text in particular.

ollef commented 8 years ago

That sounds convenient. If no one else has anything against it I say :+1: . Can you submit a pull request?

sid-kap commented 8 years ago

Sure! I'll try to send it sometime this week.

phadej commented 8 years ago

Might cause problems when used with OverloadedStrings. I'd give new name to the new more polymorphic variant.

ollef commented 8 years ago

Done on master.