diff --git a/.gitignore b/.gitignore index 2c8da16ac4f..423fac86947 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,13 @@ cabal-install/dist/ *.prof *.tix +# editor temp files + +*# +.#* +*~ +.*.swp + # GHC build Cabal/GNUmakefile diff --git a/Cabal/Distribution/Simple/Program/GHC.hs b/Cabal/Distribution/Simple/Program/GHC.hs index c0c6868ad82..340c04eea1e 100644 --- a/Cabal/Distribution/Simple/Program/GHC.hs +++ b/Cabal/Distribution/Simple/Program/GHC.hs @@ -300,7 +300,9 @@ renderGhcOptions version@(Version ver _) opts = ---------------------------- -- Language and extensions - , [ "-X" ++ display lang | lang <- flag ghcOptLanguage ] + , if ver >= [7] + then [ "-X" ++ display lang | lang <- flag ghcOptLanguage ] + else [] , [ case lookup ext (ghcOptExtensionMap opts) of Just arg -> arg