The file should document what extensions it uses through LANGUAGE pragmas. Why do we auto-enable a (outdated) list of all extensions? I propose to instead enable a minimal amount of extensions, and otherwise use LANGUAGE pragmas.
Perhaps the most interesting question then is, should RegularPatterns and XmlSyntax be auto-enabled, or declared? I think the most consistent choice is to not auto-enable even them, instead forcing the file to declare their presence. That way GHC will correctly thrown an "Unknown extension" error if someone tries to bypass hsx2hs.
... though right now, hsx2hs doesn't remove those pragmas, so GHC will throw that error regardless. That's a separate bug though - see #2.
The file should document what extensions it uses through LANGUAGE pragmas. Why do we auto-enable a (outdated) list of all extensions? I propose to instead enable a minimal amount of extensions, and otherwise use LANGUAGE pragmas.
Perhaps the most interesting question then is, should
RegularPatternsandXmlSyntaxbe auto-enabled, or declared? I think the most consistent choice is to not auto-enable even them, instead forcing the file to declare their presence. That way GHC will correctly thrown an "Unknown extension" error if someone tries to bypasshsx2hs.... though right now, hsx2hs doesn't remove those pragmas, so GHC will throw that error regardless. That's a separate bug though - see #2.