From: simonmar Date: Mon, 8 Nov 1999 15:33:20 +0000 (+0000) Subject: [project @ 1999-11-08 15:33:20 by simonmar] X-Git-Tag: Approximately_9120_patches~5594 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=ce85eb65d37c6ca8cfdf1e3de1d2d708ceee0283;p=ghc-hetmet.git [project @ 1999-11-08 15:33:20 by simonmar] Don't allow litlits in patterns. --- diff --git a/ghc/compiler/parser/ParseUtil.lhs b/ghc/compiler/parser/ParseUtil.lhs index 8f5fc39..77b7052 100644 --- a/ghc/compiler/parser/ParseUtil.lhs +++ b/ghc/compiler/parser/ParseUtil.lhs @@ -186,7 +186,8 @@ checkPat (HsApp f x) args = checkPat e [] = case e of EWildPat -> returnP WildPatIn HsVar x -> returnP (VarPatIn x) - HsLit l -> returnP (LitPatIn l) + HsLit (HsLitLit _) -> patFail + HsLit l -> returnP (LitPatIn l) ELazyPat e -> checkPat e [] `thenP` (returnP . LazyPatIn) EAsPat n e -> checkPat e [] `thenP` (returnP . AsPatIn n) ExprWithTySig e t -> checkPat e [] `thenP` \e ->