summaryrefslogtreecommitdiff
path: root/compiler/main/HscMain.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2018-04-18 23:55:14 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2018-04-27 15:38:46 +0200
commitc3823cba2147c74b2c727b5458b9e95350496988 (patch)
treee9afa7f5fd6b1a3f2f1a2ee87d659342803e6a2d /compiler/main/HscMain.hs
parent313720a453889ddd05da02f4f2c31eb3bc3734d2 (diff)
downloadhaskell-c3823cba2147c74b2c727b5458b9e95350496988.tar.gz
TTG : complete for balance of hsSyn AST
Summary: - remove PostRn/PostTc fields - remove the HsVect In/Out distinction for Type, Class and Instance - remove PlaceHolder in favour of NoExt - Simplify OutputableX constraint Updates haddock submodule Test Plan: ./validate Reviewers: goldfire, bgamari Subscribers: goldfire, thomie, mpickering, carter Differential Revision: https://phabricator.haskell.org/D4625
Diffstat (limited to 'compiler/main/HscMain.hs')
-rw-r--r--compiler/main/HscMain.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs
index b55267d5e3..223886a1fc 100644
--- a/compiler/main/HscMain.hs
+++ b/compiler/main/HscMain.hs
@@ -909,10 +909,11 @@ hscCheckSafeImports tcg_env = do
-> return tcg_env'
warns dflags rules = listToBag $ map (warnRules dflags) rules
- warnRules dflags (L loc (HsRule n _ _ _ _ _ _)) =
+ warnRules dflags (L loc (HsRule _ n _ _ _ _)) =
mkPlainWarnMsg dflags loc $
text "Rule \"" <> ftext (snd $ unLoc n) <> text "\" ignored" $+$
text "User defined rules are disabled under Safe Haskell"
+ warnRules _ (L _ (XRuleDecl _)) = panic "hscCheckSafeImports"
-- | Validate that safe imported modules are actually safe. For modules in the
-- HomePackage (the package the module we are compiling in resides) this just
@@ -1715,7 +1716,7 @@ hscParseExpr expr = do
hsc_env <- getHscEnv
maybe_stmt <- hscParseStmt expr
case maybe_stmt of
- Just (L _ (BodyStmt expr _ _ _)) -> return expr
+ Just (L _ (BodyStmt _ expr _ _)) -> return expr
_ -> throwErrors $ unitBag $ mkPlainErrMsg (hsc_dflags hsc_env) noSrcSpan
(text "not an expression:" <+> quotes (text expr))