Consider allowing -include-cpp-deps on modules that fail to parse.
GHC's -M
option doesn't require a full module parse unless -include-cpp-deps
is used. This is because the CPP deps are parsed from LINE pragmas in the preprocesser output. It should be possible to have a simpler parser that just identifies the LINE pragmas and doesn't fail. Consider whether or not this is a good idea.