Commit 620410fe authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

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.
parent 25fa4bdb
......@@ -306,7 +306,10 @@ rnValBindsRHS trim mb_bound_names (ValBindsIn mbinds sigs)
(anal_binds, anal_dus) -> return (valbind', valbind'_dus)
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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment