summaryrefslogtreecommitdiff
path: root/compiler/main/HeaderInfo.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-07-24 23:01:21 +0000
committerIan Lynagh <igloo@earth.li>2010-07-24 23:01:21 +0000
commit0e6ff027979263c36703f26da836a784fe1606a2 (patch)
tree8282b511cd803d91e5cce7ef4e01f22f5f4a234b /compiler/main/HeaderInfo.hs
parent1971591f865ac0806802c476f23792ae2c89411a (diff)
downloadhaskell-0e6ff027979263c36703f26da836a784fe1606a2.tar.gz
Add support for Haskell98 and Haskell2010 "languages"
Diffstat (limited to 'compiler/main/HeaderInfo.hs')
-rw-r--r--compiler/main/HeaderInfo.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/main/HeaderInfo.hs b/compiler/main/HeaderInfo.hs
index 4c664bdc04..d21eeac860 100644
--- a/compiler/main/HeaderInfo.hs
+++ b/compiler/main/HeaderInfo.hs
@@ -266,7 +266,7 @@ checkExtension (L l ext)
-- Checks if a given extension is valid, and if so returns
-- its corresponding flag. Otherwise it throws an exception.
= let ext' = unpackFS ext in
- if ext' `elem` supportedExtensions
+ if ext' `elem` supportedLanguagesAndExtensions
then L l ("-X"++ext')
else unsupportedExtnError l ext'
@@ -285,7 +285,7 @@ unsupportedExtnError loc unsup =
mkPlainErrMsg loc $
text "Unsupported extension: " <> text unsup $$
if null suggestions then empty else text "Perhaps you meant" <+> quotedListWithOr (map text suggestions)
- where suggestions = fuzzyMatch unsup supportedExtensions
+ where suggestions = fuzzyMatch unsup supportedLanguagesAndExtensions
optionsErrorMsgs :: [String] -> [Located String] -> FilePath -> Messages