[Haskell-cafe] tokenize parser combinators and free applicatives

Ruben Astudillo ruben.astud at gmail.com
Tue Oct 18 12:12:22 UTC 2016

Hi all

on [1] it is said the following

    "Dealing with whitespace and comments is awkward in the parser; you
    need to wrap everything in a token combinator. (If you decide to do
    that, at least use a free applicative functor to ensure that you
    don’t forget to consume that whitespace)."

Reading on `free` the def of Ap, frankly I don't see how can the free
applicative be used for this. Anybody could drop a hint? I would
appreciate it.

[1]: https://ro-che.info/articles/2015-01-02-lexical-analysis
-- Ruben

More information about the Haskell-Cafe mailing list