projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2002-09-09 12:50:26 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
typecheck
/
TcMType.lhs
diff --git
a/ghc/compiler/typecheck/TcMType.lhs
b/ghc/compiler/typecheck/TcMType.lhs
index
c13993a
..
d4d506a
100644
(file)
--- a/
ghc/compiler/typecheck/TcMType.lhs
+++ b/
ghc/compiler/typecheck/TcMType.lhs
@@
-936,6
+936,10
@@
check_valid_theta ctxt []
check_valid_theta ctxt theta
= getDOptsTc `thenNF_Tc` \ dflags ->
warnTc (notNull dups) (dupPredWarn dups) `thenNF_Tc_`
check_valid_theta ctxt theta
= getDOptsTc `thenNF_Tc` \ dflags ->
warnTc (notNull dups) (dupPredWarn dups) `thenNF_Tc_`
+ -- Actually, in instance decls and type signatures,
+ -- duplicate constraints are eliminated by TcMonoType.hoistForAllTys,
+ -- so this error can only fire for the context of a class or
+ -- data type decl.
mapTc_ (check_source_ty dflags ctxt) theta
where
(_,dups) = removeDups tcCmpPred theta
mapTc_ (check_source_ty dflags ctxt) theta
where
(_,dups) = removeDups tcCmpPred theta