Browse files

Do not pass -XHaskell98 to older compilers (fixes #1016)

  • Loading branch information...
1 parent 6450123 commit 8036af8c286074e05392247fef0c7d48e8da1ef4 @bos bos committed Aug 29, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 Cabal/Distribution/Simple/Program/GHC.hs
View
4 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

0 comments on commit 8036af8

Please sign in to comment.