X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Frename%2FRnPat.lhs;h=ac35fe55fc72af9a671e58d37eef79b99edb853c;hb=9d0c8f842e35dde3d570580cf62a32779f66a6de;hp=584c2870cde83a63f02ce2123ebd9d9adeae35b2;hpb=432b38b66700d243369df5b76e5c5c01b5e197ff;p=ghc-hetmet.git diff --git a/compiler/rename/RnPat.lhs b/compiler/rename/RnPat.lhs index 584c287..ac35fe5 100644 --- a/compiler/rename/RnPat.lhs +++ b/compiler/rename/RnPat.lhs @@ -212,7 +212,7 @@ rnLPatAndThen var@(NM varf) (L loc p) cont = -- (e.g. in the pattern (x, x -> y) x needs to be bound in the rhs of the tuple) SigPatIn pat ty -> do - patsigs <- doptM Opt_PatternSignatures + patsigs <- doptM Opt_ScopedTypeVariables if patsigs then rnLPatAndThen var pat (\ pat' -> do { (ty', fvs1) <- rnHsTypeFVs tvdoc ty @@ -296,9 +296,9 @@ rnLPatAndThen var@(NM varf) (L loc p) cont = ; rnLPatsAndThen var pats $ \ patslist -> lcont (TuplePat patslist boxed placeHolderType) } - TypePat name -> - do { (name', fvs1) <- rnHsTypeFVs (text "In a type pattern") name - ; (res, fvs2) <- lcont (TypePat name') + TypePat ty -> + do { (ty', fvs1) <- rnHsTypeFVs (text "In a type pattern") ty + ; (res, fvs2) <- lcont (TypePat ty') ; return (res, fvs1 `plusFV` fvs2) } p -> pprPanic "rnLPatAndThen" (ppr p) @@ -580,7 +580,7 @@ checkTupSize tup_size patSigErr :: Outputable a => a -> SDoc patSigErr ty = (ptext (sLit "Illegal signature in pattern:") <+> ppr ty) - $$ nest 4 (ptext (sLit "Use -XPatternSignatures to permit it")) + $$ nest 4 (ptext (sLit "Use -XScopedTypeVariables to permit it")) dupFieldErr :: String -> RdrName -> SDoc dupFieldErr str dup