Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
9db74caf
Commit
9db74caf
authored
Jan 25, 2006
by
simonpj@microsoft.com
Browse files
Fix conDeclFVs for GADTs, to fix bogus unused-import warning
parent
3cc8487e
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/rename/RnHsSyn.lhs
View file @
9db74caf
...
...
@@ -117,17 +117,15 @@ hsSigFVs (SpecSig v ty inl) = extractHsTyNames ty
hsSigFVs other = emptyFVs
----------------
-- XXX - autrijus - handle return type for GADT
conDeclFVs (L _ (ConDecl _ _ tyvars context details _
))
conDeclFVs (L _ (ConDecl { con_qvars = tyvars, con_cxt = context,
con_details = details, con_res = res_ty}
))
= delFVs (map hsLTyVarName tyvars) $
extractHsCtxtTyNames context `plusFV`
conDetailsFVs details
extractHsCtxtTyNames context `plusFV`
conDetailsFVs details `plusFV`
conResTyFVs res_ty
{-
-- gaw 2004
conDeclFVs (L _ (GadtDecl _ ty))
= extractHsTyNames ty
-}
conResTyFVs ResTyH98 = emptyFVs
conResTyFVs (ResTyGADT ty) = extractHsTyNames ty
conDetailsFVs (PrefixCon btys) = plusFVs (map bangTyFVs btys)
conDetailsFVs (InfixCon bty1 bty2) = bangTyFVs bty1 `plusFV` bangTyFVs bty2
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment