Commit cc0dba1e authored by Simon Peyton Jones's avatar Simon Peyton Jones

Minor fix to free-vars in RnTypes

A type wild-card should't appear in the "uses"
free-variable set.
parent 0b7e538a
......@@ -285,7 +285,9 @@ rnHsTyKi isType _doc (HsWildCardTy (AnonWildCard PlaceHolder))
do { loc <- getSrcSpanM
; uniq <- newUnique
; let name = mkInternalName uniq (mkTyVarOcc "_") loc
; return (HsWildCardTy (AnonWildCard name), unitFV name) }
; return (HsWildCardTy (AnonWildCard name), emptyFVs) }
-- emptyFVs: this occurrence does not refer to a
-- binding, so don't treat it as a free variable
rnHsTyKi isType doc (HsWildCardTy (NamedWildCard rdr_name))
= ASSERT( isType )
......@@ -297,7 +299,9 @@ rnHsTyKi isType doc (HsWildCardTy (NamedWildCard rdr_name))
failWith $ text "Unexpected wild card:" <+> quotes (ppr rdr_name) $$
docOfHsDocContext doc
; name <- rnTyVar isType rdr_name
; return (HsWildCardTy (NamedWildCard name), unitFV name) }
; return (HsWildCardTy (NamedWildCard name), emptyFVs) }
-- emptyFVs: this occurrence does not refer to a
-- binding, so don't treat it as a free variable
--------------
rnHsTyKiForAll :: Bool -> HsDocContext -> HsType RdrName
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment