diff options
Diffstat (limited to 'compiler/GHC/Parser/PostProcess.hs')
-rw-r--r-- | compiler/GHC/Parser/PostProcess.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/GHC/Parser/PostProcess.hs b/compiler/GHC/Parser/PostProcess.hs index 8e85c9493e..84aa3e09bc 100644 --- a/compiler/GHC/Parser/PostProcess.hs +++ b/compiler/GHC/Parser/PostProcess.hs @@ -810,7 +810,7 @@ mkRuleTyVarBndrs = fmap (fmap cvt_one) -- See note [Parsing explicit foralls in Rules] in Parser.y checkRuleTyVarBndrNames :: [LHsTyVarBndr flag GhcPs] -> P () checkRuleTyVarBndrNames = mapM_ (check . fmap hsTyVarName) - where check (L loc (Unqual occ)) = do + where check (L loc (Unqual occ)) = -- TODO: don't use string here, OccName has a Unique/FastString when ((occNameString occ ==) `any` ["forall","family","role"]) (addFatalError $ Error (ErrParseErrorOnInput occ) [] loc) @@ -878,8 +878,7 @@ checkCmdBlockArguments :: LHsCmd GhcPs -> PV () (checkExpBlockArguments, checkCmdBlockArguments) = (checkExpr, checkCmd) where checkExpr :: LHsExpr GhcPs -> PV () - checkExpr expr = do - case unLoc expr of + checkExpr expr = case unLoc expr of HsDo _ (DoExpr m) _ -> check (ErrDoInFunAppExpr m) expr HsDo _ (MDoExpr m) _ -> check (ErrMDoInFunAppExpr m) expr HsLam {} -> check ErrLambdaInFunAppExpr expr @@ -1458,7 +1457,7 @@ instance DisambECP (HsExpr GhcPs) where mkHsLetPV l bs c = return $ L l (HsLet noExtField bs c) type InfixOp (HsExpr GhcPs) = HsExpr GhcPs superInfixOp m = m - mkHsOpAppPV l e1 op e2 = do + mkHsOpAppPV l e1 op e2 = return $ L l $ OpApp noExtField e1 op e2 mkHsCasePV l e mg = return $ L l (HsCase noExtField e mg) mkHsLamCasePV l mg = return $ L l (HsLamCase noExtField mg) |