projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support of TNTC to llvm backend
[ghc-hetmet.git]
/
compiler
/
main
/
HeaderInfo.hs
diff --git
a/compiler/main/HeaderInfo.hs
b/compiler/main/HeaderInfo.hs
index
e16c2ce
..
b520098
100644
(file)
--- 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
-- 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'
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 $
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
optionsErrorMsgs :: [String] -> [Located String] -> FilePath -> Messages