[commit: ghc] ghc-7.10: Remove unused parameter to `EvTypeableTyCon` (4631675)

git at git.haskell.org git at git.haskell.org
Sat Mar 21 22:30:23 UTC 2015


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

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/463167577b8d621369df91a0b845acdd1d027db1/ghc

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

commit 463167577b8d621369df91a0b845acdd1d027db1
Author: Iavor S. Diatchki <diatchki at galois.com>
Date:   Thu Mar 19 15:33:50 2015 -0700

    Remove unused parameter to `EvTypeableTyCon`
    
    (cherry picked from commit 75ef8b3b56f0b33c6be782b59a55b853565ea5f4)


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

463167577b8d621369df91a0b845acdd1d027db1
 compiler/deSugar/DsBinds.hs      | 7 +++----
 compiler/typecheck/TcEvidence.hs | 7 +++----
 compiler/typecheck/TcHsSyn.hs    | 2 +-
 compiler/typecheck/TcInteract.hs | 2 +-
 4 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/compiler/deSugar/DsBinds.hs b/compiler/deSugar/DsBinds.hs
index 0031040..76b53ac 100644
--- a/compiler/deSugar/DsBinds.hs
+++ b/compiler/deSugar/DsBinds.hs
@@ -919,7 +919,7 @@ dsEvTypeable ev =
      (ty, rep) <-
         case ev of
 
-          EvTypeableTyCon tc ks ts ->
+          EvTypeableTyCon tc ks ->
             do ctr       <- dsLookupGlobalId mkPolyTyConAppName
                mkTyCon   <- dsLookupGlobalId mkTyConName
                dflags    <- getDynFlags
@@ -938,10 +938,9 @@ dsEvTypeable ev =
                tcRep     <- tyConRep dflags mkTyCon tc
 
                kReps     <- mapM kindRep ks
-               tReps     <- mapM (getRep tyCl) ts
 
-               return ( mkTyConApp tc (ks ++ map snd ts)
-                      , mkRep tcRep kReps tReps
+               return ( mkTyConApp tc ks
+                      , mkRep tcRep kReps []
                       )
 
           EvTypeableTyApp t1 t2 ->
diff --git a/compiler/typecheck/TcEvidence.hs b/compiler/typecheck/TcEvidence.hs
index 5bfd209..a5a727b 100644
--- a/compiler/typecheck/TcEvidence.hs
+++ b/compiler/typecheck/TcEvidence.hs
@@ -711,7 +711,7 @@ data EvTerm
 
 -- | Instructions on how to make a 'Typeable' dictionary.
 data EvTypeable
-  = EvTypeableTyCon TyCon [Kind] [(EvTerm, Type)]
+  = EvTypeableTyCon TyCon [Kind]
     -- ^ Dicitionary for concrete type constructors.
 
   | EvTypeableTyApp (EvTerm,Type) (EvTerm,Type)
@@ -859,7 +859,7 @@ evVarsOfTerms = mapUnionVarSet evVarsOfTerm
 evVarsOfTypeable :: EvTypeable -> VarSet
 evVarsOfTypeable ev =
   case ev of
-    EvTypeableTyCon _ _ es -> evVarsOfTerms (map fst es)
+    EvTypeableTyCon _ _    -> emptyVarSet
     EvTypeableTyApp e1 e2  -> evVarsOfTerms (map fst [e1,e2])
     EvTypeableTyLit _      -> emptyVarSet
 
@@ -933,7 +933,6 @@ instance Outputable EvLit where
 instance Outputable EvTypeable where
   ppr ev =
     case ev of
-      EvTypeableTyCon tc ks ts -> parens (ppr tc <+> sep (map ppr ks) <+>
-                                                     sep (map (ppr . fst) ts))
+      EvTypeableTyCon tc ks    -> parens (ppr tc <+> sep (map ppr ks))
       EvTypeableTyApp t1 t2    -> parens (ppr (fst t1) <+> ppr (fst t2))
       EvTypeableTyLit x        -> ppr x
diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs
index 01b1cf7..4dfd5e9 100644
--- a/compiler/typecheck/TcHsSyn.hs
+++ b/compiler/typecheck/TcHsSyn.hs
@@ -1250,7 +1250,7 @@ zonkEvTerm _   (EvLit l)          = return (EvLit l)
 zonkEvTerm env (EvTypeable ev) =
   fmap EvTypeable $
   case ev of
-    EvTypeableTyCon tc ks ts -> EvTypeableTyCon tc ks `fmap` mapM zonk ts
+    EvTypeableTyCon tc ks    -> return (EvTypeableTyCon tc ks)
     EvTypeableTyApp t1 t2    -> do e1 <- zonk t1
                                    e2 <- zonk t2
                                    return (EvTypeableTyApp e1 e2)
diff --git a/compiler/typecheck/TcInteract.hs b/compiler/typecheck/TcInteract.hs
index bd0a5dc..7569d56 100644
--- a/compiler/typecheck/TcInteract.hs
+++ b/compiler/typecheck/TcInteract.hs
@@ -2133,7 +2133,7 @@ matchTypeableClass clas k t loc
   doTyCon tc ks =
     case mapM kindRep ks of
       Nothing    -> return NoInstance
-      Just kReps -> mkSimpEv (EvTypeableTyCon tc kReps [])
+      Just kReps -> mkSimpEv (EvTypeableTyCon tc kReps)
 
   {- Representation for an application of a type to a type-or-kind.
   This may happen when the type expression starts with a type variable.



More information about the ghc-commits mailing list