X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Freader%2FRdrHsSyn.lhs;h=22827fa4e1d865e34368a8e679e9ab8e2a9f944b;hb=e12e19567024ade8643918a88cc22a74d879afdb;hp=053915204f13f7d30060ee5e696053339dea3859;hpb=85bd53c951e5504005b9bf9dc3dd884099942f37;p=ghc-hetmet.git diff --git a/ghc/compiler/reader/RdrHsSyn.lhs b/ghc/compiler/reader/RdrHsSyn.lhs index 0539152..22827fa 100644 --- a/ghc/compiler/reader/RdrHsSyn.lhs +++ b/ghc/compiler/reader/RdrHsSyn.lhs @@ -127,16 +127,16 @@ extractHsTyVars ty -- In (All a => a -> a) -> Int, there are no free tyvars -- We just assume that we quantify over all type variables mentioned in the context. - get (HsPreForAllTy ctxt ty) acc = filter (`notElem` locals) (get ty []) - ++ acc - where - locals = foldr (get . snd) [] ctxt + get (HsPreForAllTy ctxt ty) acc = + foldr insert acc (filter (`notElem` locals) (get ty [])) + where + locals = foldr (get . snd) [] ctxt - get (HsForAllTy tvs ctxt ty) acc = (filter (`notElem` locals) $ + get (HsForAllTy tvs ctxt ty) acc = + foldr insert acc (filter (`notElem` locals) $ foldr (get . snd) (get ty []) ctxt) - ++ acc - where - locals = map getTyVarName tvs + where + locals = map getTyVarName tvs insert (Qual _ _ _) acc = acc insert (Unqual (TCOcc _)) acc = acc