diff options
author | Max Bolingbroke <batterseapower@hotmail.com> | 2010-04-13 19:28:25 +0000 |
---|---|---|
committer | Max Bolingbroke <batterseapower@hotmail.com> | 2010-04-13 19:28:25 +0000 |
commit | 00022894bbb2dfa33fd213eedbac0f28b4c4b7b4 (patch) | |
tree | 849a53c55d4a0071059bd100b205bf5b558089b0 /compiler/main/HeaderInfo.hs | |
parent | 5e5018b65d98a090f069f3b861f30ffe3c196fd5 (diff) | |
download | haskell-00022894bbb2dfa33fd213eedbac0f28b4c4b7b4.tar.gz |
Spelling correction for LANGUAGE pragmas
Diffstat (limited to 'compiler/main/HeaderInfo.hs')
-rw-r--r-- | compiler/main/HeaderInfo.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/main/HeaderInfo.hs b/compiler/main/HeaderInfo.hs index e16c2ce562..b520098a28 100644 --- a/compiler/main/HeaderInfo.hs +++ b/compiler/main/HeaderInfo.hs @@ -264,7 +264,6 @@ checkExtension (L l ext) -- its corresponding flag. Otherwise it throws an exception. = let ext' = unpackFS ext in if ext' `elem` supportedLanguages - || ext' `elem` (map ("No"++) supportedLanguages) then L l ("-X"++ext') else unsupportedExtnError l ext' @@ -281,7 +280,9 @@ unsupportedExtnError :: SrcSpan -> String -> a unsupportedExtnError loc unsup = throw $ mkSrcErr $ unitBag $ mkPlainErrMsg loc $ - text "Unsupported extension: " <> text unsup + text "Unsupported extension: " <> text unsup $$ + if null suggestions then empty else text "Perhaps you meant" <+> quotedListWithOr (map text suggestions) + where suggestions = fuzzyMatch unsup supportedLanguages optionsErrorMsgs :: [String] -> [Located String] -> FilePath -> Messages |