Closed rubik closed 9 years ago
Please can you describe the bug you fixed?
Sometimes, when enabling CPP, the parsing failed even when the syntax was correct. The reason was that the updated DynFlags (updated during preprocessing) were discarded instead of being used for the parsing.
Example of the bug: https://github.com/rubik/argon/issues/14#issuecomment-152005234
Yep, looks like a clear bug. A patch would be appreciated.
I had taken your
Preprocess
module and modified it a little to suit my needs for the Argon project. I had encountered a bug in CPP preprocessing, and I see now that it's mentioned in ghc-exactprint's readme.This is the commit in which I fixed the problem: https://github.com/rubik/argon/commit/35ad16fab24e4be92948818ec137f48d1c3235ec
I annotated the commit diff to show exactly what changed. I could submit a PR if you want, but I'd need tests in order to verify my work.