X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Frename%2FRnHsSyn.lhs;h=4171e34c6dea403a4e5046fc2cf727296747c798;hb=32f35c6fba6a8a2076c79e775644dbc76778c3a1;hp=53f04e2ba2b5e60d69268b4dfd27619453df4027;hpb=190f24892156953d73b55401d0467a6f1a88ce5d;p=ghc-hetmet.git diff --git a/compiler/rename/RnHsSyn.lhs b/compiler/rename/RnHsSyn.lhs index 53f04e2..4171e34 100644 --- a/compiler/rename/RnHsSyn.lhs +++ b/compiler/rename/RnHsSyn.lhs @@ -4,6 +4,13 @@ \section[RnHsSyn]{Specialisations of the @HsSyn@ syntax for the renamer} \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module RnHsSyn( -- Names charTyCon_name, listTyCon_name, parrTyCon_name, tupleTyCon_name, @@ -87,6 +94,8 @@ extractHsCtxtTyNames (L _ ctxt) -- so don't mention the IP names extractHsPredTyNames (HsClassP cls tys) = unitNameSet cls `unionNameSets` extractHsTyNames_s tys +extractHsPredTyNames (HsEqualP ty1 ty2) + = extractHsTyNames ty1 `unionNameSets` extractHsTyNames ty2 extractHsPredTyNames (HsIParam n ty) = extractHsTyNames ty \end{code} @@ -128,9 +137,8 @@ conDeclFVs (L _ (ConDecl { con_qvars = tyvars, con_cxt = context, conResTyFVs ResTyH98 = emptyFVs conResTyFVs (ResTyGADT ty) = extractHsTyNames ty -conDetailsFVs (PrefixCon btys) = plusFVs (map bangTyFVs btys) -conDetailsFVs (InfixCon bty1 bty2) = bangTyFVs bty1 `plusFV` bangTyFVs bty2 -conDetailsFVs (RecCon flds) = plusFVs [bangTyFVs bty | (HsRecField _ bty _) <- flds] +conDetailsFVs :: HsConDeclDetails Name -> FreeVars +conDetailsFVs details = plusFVs (map bangTyFVs (hsConDeclArgTys details)) bangTyFVs bty = extractHsTyNames (getBangType bty) \end{code}