-- (2) whether the scope of the names is entirely given in a continuation\r
-- (e.g., in a case or lambda, but not in a let or at the top-level,\r
-- because of the way mutually recursive bindings are handled)\r
--- (3) whether the type signatures can bind variables\r
--- (for unpacking existential type vars in data constructors)\r
+-- (3) whether the a type signature in the pattern can bind \r
+-- lexically-scoped type variables (for unpacking existential \r
+-- type vars in data constructors)\r
-- (4) whether we do duplicate and unused variable checking\r
-- (5) whether there are fixity declarations associated with the names\r
-- bound by the patterns that need to be brought into scope with them.\r
\r
-- entry point 1:\r
-- binds local names; the scope of the bindings is entirely in the thing_inside\r
--- allows type sigs to bind vars\r
+-- allows type sigs to bind type vars\r
-- local namemaker\r
-- unused and duplicate checking\r
-- no fixities\r
\r
-- entry point 2:\r
-- binds local names; in a recursive scope that involves other bound vars\r
--- allows type sigs to bind vars\r
+-- e.g let { (x, Just y) = e1; ... } in ...\r
+-- does NOT allows type sig to bind type vars\r
-- local namemaker\r
-- no unused and duplicate checking\r
-- fixities might be coming in\r
FreeVars)\r
\r
rnPat_LocalRec fix_env pat = \r
- bindPatSigTyVarsFV (collectSigTysFromPats [pat]) $ \r
rnLPatsAndThen localNameMaker fix_env [pat] $ \ ([pat'], pat_fvs) ->\r
return (pat', pat_fvs)\r
\r
\r
patSigErr ty\r
= (ptext SLIT("Illegal signature in pattern:") <+> ppr ty)\r
- $$ nest 4 (ptext SLIT("Use -fglasgow-exts to permit it"))\r
+ $$ nest 4 (ptext SLIT("Use -XPatternSignatures to permit it"))\r
\r
dupFieldErr str dup\r
= hsep [ptext SLIT("duplicate field name"), \r