[commit: ghc] wip/T9968: I think this was just wrong (f6be00a)

git at git.haskell.org git at git.haskell.org
Thu Feb 19 12:39:51 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T9968
Link       : http://ghc.haskell.org/trac/ghc/changeset/f6be00ae48a425549448666757099f503037576d/ghc

>---------------------------------------------------------------

commit f6be00ae48a425549448666757099f503037576d
Author: Jose Pedro Magalhaes <jpm at cs.ox.ac.uk>
Date:   Wed Feb 18 09:23:58 2015 +0000

    I think this was just wrong


>---------------------------------------------------------------

f6be00ae48a425549448666757099f503037576d
 compiler/typecheck/TcDeriv.hs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/compiler/typecheck/TcDeriv.hs b/compiler/typecheck/TcDeriv.hs
index 219bb2c..a2fcc80 100644
--- a/compiler/typecheck/TcDeriv.hs
+++ b/compiler/typecheck/TcDeriv.hs
@@ -772,8 +772,9 @@ deriveTyData is_instance tvs tc tc_args (L loc deriv_pred)
 
         ; traceTc "derivTyData2" (vcat [ ppr univ_tvs ])
 
-        ; checkTc (allDistinctTyVars args_to_drop &&              -- (a) and (b)
-                   not (any (`elemVarSet` dropped_tvs) univ_tvs)) -- (c)
+        ; checkTc (allDistinctTyVars args_to_drop &&  -- (a) and (b)
+                   dropped_tvs `disjointVarSet`
+                     tyVarsOfTypes final_cls_tys)     -- (c)
                   (derivingEtaErr cls final_cls_tys (mkTyConApp tc final_tc_args))
                 -- Check that
                 --  (a) The args to drop are all type variables; eg reject:



More information about the ghc-commits mailing list