diff options
Diffstat (limited to 'ghc/compiler/rename')
-rw-r--r-- | ghc/compiler/rename/RnExpr.lhs | 17 | ||||
-rw-r--r-- | ghc/compiler/rename/RnTypes.lhs | 8 |
2 files changed, 14 insertions, 11 deletions
diff --git a/ghc/compiler/rename/RnExpr.lhs b/ghc/compiler/rename/RnExpr.lhs index 95d7b8307e..a128c3561f 100644 --- a/ghc/compiler/rename/RnExpr.lhs +++ b/ghc/compiler/rename/RnExpr.lhs @@ -255,14 +255,9 @@ Since all the symbols are reservedops we can simply reject them. We return a (bogus) EWildPat in each case. \begin{code} -rnExpr e@EWildPat = addErr (patSynErr e) `thenM_` - returnM (EWildPat, emptyFVs) - -rnExpr e@(EAsPat _ _) = addErr (patSynErr e) `thenM_` - returnM (EWildPat, emptyFVs) - -rnExpr e@(ELazyPat _) = addErr (patSynErr e) `thenM_` - returnM (EWildPat, emptyFVs) +rnExpr e@EWildPat = patSynErr e +rnExpr e@(EAsPat {}) = patSynErr e +rnExpr e@(ELazyPat {}) = patSynErr e \end{code} %************************************************************************ @@ -943,9 +938,9 @@ mkAssertErrorExpr %************************************************************************ \begin{code} -patSynErr e - = sep [ptext SLIT("Pattern syntax in expression context:"), - nest 4 (ppr e)] +patSynErr e = do { addErr (sep [ptext SLIT("Pattern syntax in expression context:"), + nest 4 (ppr e)]) + ; return (EWildPat, emptyFVs) } parStmtErr = addErr (ptext SLIT("Illegal parallel list comprehension: use -fglasgow-exts")) diff --git a/ghc/compiler/rename/RnTypes.lhs b/ghc/compiler/rename/RnTypes.lhs index bfd0289664..d7d435ce97 100644 --- a/ghc/compiler/rename/RnTypes.lhs +++ b/ghc/compiler/rename/RnTypes.lhs @@ -185,6 +185,10 @@ rnHsType doc (HsPredTy pred) = rnPred doc pred `thenM` \ pred' -> returnM (HsPredTy pred') +rnHsType doc (HsSpliceTy _) + = do { addErr (ptext SLIT("Type splices are not yet implemented")) + ; failM } + rnLHsTypes doc tys = mappM (rnLHsType doc) tys \end{code} @@ -594,6 +598,10 @@ rnPat (LazyPat pat) = rnLPat pat `thenM` \ (pat', fvs) -> returnM (LazyPat pat', fvs) +rnPat (BangPat pat) + = rnLPat pat `thenM` \ (pat', fvs) -> + returnM (BangPat pat', fvs) + rnPat (AsPat name pat) = rnLPat pat `thenM` \ (pat', fvs) -> lookupLocatedBndrRn name `thenM` \ vname -> |