summaryrefslogtreecommitdiff
path: root/compiler/rename/RnBinds.lhs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-04-30 14:26:48 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-04-30 14:26:48 +0100
commit224ef3094189bc9a33f23285b5dccbffdd8d7de0 (patch)
tree551c816c8c8f7df25f060f27de82c16b00f7d2c5 /compiler/rename/RnBinds.lhs
parentfdf8656855d26105ff36bdd24d41827b05037b91 (diff)
parentd1bffa693adfa48ef65240bb3c097f5f5f77868e (diff)
downloadhaskell-224ef3094189bc9a33f23285b5dccbffdd8d7de0.tar.gz
Merge remote branch 'origin/master' into ghc-new-co
Conflicts: compiler/typecheck/TcErrors.lhs compiler/typecheck/TcSMonad.lhs compiler/typecheck/TcType.lhs compiler/types/TypeRep.lhs
Diffstat (limited to 'compiler/rename/RnBinds.lhs')
-rw-r--r--compiler/rename/RnBinds.lhs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs
index 503953d4a0..286e3f2815 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)
@@ -699,7 +702,7 @@ renameSig _ (SpecInstSig ty)
-- {-# SPECIALISE #-} pragmas can refer to imported Ids
-- so, in the top-level case (when mb_names is Nothing)
-- we use lookupOccRn. If there's both an imported and a local 'f'
--- then the SPECIALISE pragma is ambiguous, unlike alll other signatures
+-- then the SPECIALISE pragma is ambiguous, unlike all other signatures
renameSig mb_names sig@(SpecSig v ty inl)
= do { new_v <- case mb_names of
Just {} -> lookupSigOccRn mb_names sig v