On parsing Haskell and CPP
gershomb at gmail.com
Sun Nov 22 20:53:20 UTC 2015
We've had quite a bit of discussion lately on the difficulty in
performing automated processing of Haskell files in the presence of
It turns out that folks have tackled this sort of problem in the world
of C, and done some interesting work.
I recently ran across SuperC , part of the xtc  project. In the
setting of C they have achieved some impressive results, including as
I understand it, the ability to handle the entire Linux kernel across
all CPP-recognized configurations.
They note that this is a rather tedious to implement task, even once
one has recognized the specification of how to do so. However, the
paper is good at reviewing related work and simpler techniques as
well, and perhaps among them there is a "good enough" set for the CPP
used in common Haskell libraries?
More information about the ghc-devs