X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fparser%2FParseUtil.lhs;h=ce4f71bfcfb96d1a6df1324224fed7b65962202b;hb=98d5ffd5eaa8af06c2d3ac7118ed09737c7d2a50;hp=e09f60feb1467d73b10f8504fe5f58d65e757c3f;hpb=14a17049447fc3532b81ea2e2ff7e2637a607be1;p=ghc-hetmet.git diff --git a/ghc/compiler/parser/ParseUtil.lhs b/ghc/compiler/parser/ParseUtil.lhs index e09f60f..ce4f71b 100644 --- a/ghc/compiler/parser/ParseUtil.lhs +++ b/ghc/compiler/parser/ParseUtil.lhs @@ -182,7 +182,14 @@ checkPat e [] = case e of ELazyPat e -> checkPat e [] `thenP` (returnP . LazyPatIn) EAsPat n e -> checkPat e [] `thenP` (returnP . AsPatIn n) ExprWithTySig e t -> checkPat e [] `thenP` \e -> - returnP (SigPatIn e t) + -- pattern signatures are parsed as sigtypes, + -- but they aren't explicit forall points. Hence + -- we have to remove the implicit forall here. + let t' = case t of + HsForAllTy Nothing [] ty -> ty + other -> other + in + returnP (SigPatIn e t') OpApp (HsVar n) (HsVar plus) _ (HsLit k@(HsInt _)) | plus == plus_RDR -> returnP (NPlusKPatIn n k)