diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-04-20 17:15:38 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-04-20 17:15:38 +0100 |
commit | 620410fed8ee6169ccdfd5d7f914433319b29ae8 (patch) | |
tree | 2d0a4fd0c3120b13b16e76e34844ad4c8a3c2fb3 /compiler/rename/RnBinds.lhs | |
parent | 25fa4bdbff4a84d6717c4ff7cdf7080687616818 (diff) | |
download | haskell-620410fed8ee6169ccdfd5d7f914433319b29ae8.tar.gz |
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.
Diffstat (limited to 'compiler/rename/RnBinds.lhs')
-rw-r--r-- | compiler/rename/RnBinds.lhs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs index 21822a8319..df3b12d1bb 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) |