[commit: ghc] master: Get rid of TcMType.newWantedEvVar(s) (1496598)

git at git.haskell.org git at git.haskell.org
Wed Dec 10 16:00:28 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/149659817afc0ffe4148af483c4ec44994b03107/ghc

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

commit 149659817afc0ffe4148af483c4ec44994b03107
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Dec 10 13:12:11 2014 +0000

    Get rid of TcMType.newWantedEvVar(s)
    
    Hardly used, not helpful.  Use newEvVar instead.


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

149659817afc0ffe4148af483c4ec44994b03107
 compiler/typecheck/Inst.hs    | 2 +-
 compiler/typecheck/TcMType.hs | 9 +--------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/compiler/typecheck/Inst.hs b/compiler/typecheck/Inst.hs
index a059c50..afe466b 100644
--- a/compiler/typecheck/Inst.hs
+++ b/compiler/typecheck/Inst.hs
@@ -73,7 +73,7 @@ emitWanteds origin theta = mapM (emitWanted origin) theta
 emitWanted :: CtOrigin -> TcPredType -> TcM EvVar
 emitWanted origin pred
   = do { loc <- getCtLoc origin
-       ; ev  <- newWantedEvVar pred
+       ; ev  <- newEvVar pred
        ; emitFlat $ mkNonCanonical $
              CtWanted { ctev_pred = pred, ctev_evar = ev, ctev_loc = loc }
        ; return ev }
diff --git a/compiler/typecheck/TcMType.hs b/compiler/typecheck/TcMType.hs
index d5a2781..b95e0c3 100644
--- a/compiler/typecheck/TcMType.hs
+++ b/compiler/typecheck/TcMType.hs
@@ -29,7 +29,6 @@ module TcMType (
   --------------------------------
   -- Creating new evidence variables
   newEvVar, newEvVars, newEq, newDict,
-  newWantedEvVar, newWantedEvVars,
   newTcEvBinds, addTcEvBind,
   newFlatWanted, newFlatWanteds,
 
@@ -124,12 +123,6 @@ newMetaKindVars n = mapM (\ _ -> newMetaKindVar) (nOfThem n ())
 newEvVars :: TcThetaType -> TcM [EvVar]
 newEvVars theta = mapM newEvVar theta
 
-newWantedEvVar :: TcPredType -> TcM EvVar
-newWantedEvVar = newEvVar
-
-newWantedEvVars :: TcThetaType -> TcM [EvVar]
-newWantedEvVars theta = mapM newWantedEvVar theta
-
 --------------
 
 newEvVar :: TcPredType -> TcM EvVar
@@ -165,7 +158,7 @@ predTypeOccName ty = case classifyPredType ty of
 newFlatWanted :: CtOrigin -> PredType -> TcM Ct
 newFlatWanted orig pty
   = do loc <- getCtLoc orig
-       v <- newWantedEvVar pty
+       v <- newEvVar pty
        return $ mkNonCanonical $
             CtWanted { ctev_evar = v
                      , ctev_pred = pty



More information about the ghc-commits mailing list