From: Simon Peyton Jones Date: Wed, 20 Apr 2011 16:15:38 +0000 (+0100) Subject: Fix Trac #5126: generate correct usage info in TH declaration quotes X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=620410fed8ee6169ccdfd5d7f914433319b29ae8 Fix Trac #5126: generate correct usage info in TH declaration quotes In RnBinds.rnValBindsRHS I had (sig_dus `plusDU` bind_dus) when it should be (bind_dus `plusDU` sig_dus) So the fix is easy. --- diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs index 21822a8..df3b12d 100644 --- a/compiler/rename/RnBinds.lhs +++ b/compiler/rename/RnBinds.lhs @@ -306,7 +306,10 @@ rnValBindsRHS trim mb_bound_names (ValBindsIn mbinds sigs) (anal_binds, anal_dus) -> return (valbind', valbind'_dus) where valbind' = ValBindsOut anal_binds sigs' - valbind'_dus = usesOnly (hsSigsFVs sigs') `plusDU` anal_dus + valbind'_dus = anal_dus `plusDU` usesOnly (hsSigsFVs sigs') + -- Put the sig uses *after* the bindings + -- so that the binders are removed from + -- the uses in the sigs } rnValBindsRHS _ _ b = pprPanic "rnValBindsRHS" (ppr b)