Is there (or is it possible to have) a reactive Parsec
(or any other pure functional parser) in Haskell?
Simply put, I want to feed parser myself char by char and get results as much as I feed enough to get output.
Or much simpler, how can I do it in foldr
or at least map
?
Do we need a different version of them to support such reactive behavior?
EDIT
My question is about FRP in particular. I used a parser as an example, which was the best I could think of to clarify my question and give big picture of what I need.
I believe FRP is not just about UI, right?
You cannot do online parsing in Parsec, it has to consume all the input in order to determine whether there is a valid parse or not.
However there are alternatives. One possiblity is to use the Utrecht parser combinators, it has online parsing among its features.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With