
18 Oct
2016
18 Oct
'16
9:23 p.m.
On 18/10/16 18:06, Ruben Astudillo wrote:
-- Works in wrong order example2 :: Either ParseError String example2 = parse (down query) "" "hi number 5" where query = liftAp (many letter) *> liftAp (many letter) *> liftAp (many digit)
I got it! I had to use the `runAp` combinator that the `free` package offered. Changing to this version, of the function above in the previous code, makes it work as intend. Sorry for bothering you! example2 :: Either ParseError String example2 = parse (runAp (\f -> f <* skipMany space) query) "" "hi number 5" where query = liftAp (many letter) *> liftAp (many letter) *> liftAp (many digit) -- -- Ruben