[commit: ghc] wip/rae: Remove vestigial isTyVar checks. (f553f81)

git at git.haskell.org git at git.haskell.org
Tue Mar 8 16:32:57 UTC 2016


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/f553f81c382a3891e5934362cd6d33604efc9ef2/ghc

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

commit f553f81c382a3891e5934362cd6d33604efc9ef2
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Fri Feb 26 08:38:35 2016 -0500

    Remove vestigial isTyVar checks.


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

f553f81c382a3891e5934362cd6d33604efc9ef2
 compiler/typecheck/TcType.hs | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/compiler/typecheck/TcType.hs b/compiler/typecheck/TcType.hs
index 972cbae..c5e1943 100644
--- a/compiler/typecheck/TcType.hs
+++ b/compiler/typecheck/TcType.hs
@@ -849,22 +849,18 @@ isTouchableOrFmv ctxt_tclvl tv
 
 isTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool
 isTouchableMetaTyVar ctxt_tclvl tv
-  | isTyVar tv
   = case tcTyVarDetails tv of
       MetaTv { mtv_tclvl = tv_tclvl }
         -> ASSERT2( checkTcLevelInvariant ctxt_tclvl tv_tclvl,
                     ppr tv $$ ppr tv_tclvl $$ ppr ctxt_tclvl )
            tv_tclvl `sameDepthAs` ctxt_tclvl
       _ -> False
-  | otherwise = False
 
 isFloatedTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool
 isFloatedTouchableMetaTyVar ctxt_tclvl tv
-  | isTyVar tv
   = case tcTyVarDetails tv of
       MetaTv { mtv_tclvl = tv_tclvl } -> tv_tclvl `strictlyDeeperThan` ctxt_tclvl
       _ -> False
-  | otherwise = False
 
 isImmutableTyVar :: TyVar -> Bool
 isImmutableTyVar tv
@@ -879,11 +875,9 @@ isTyConableTyVar tv
         -- True of a meta-type variable that can be filled in
         -- with a type constructor application; in particular,
         -- not a SigTv
-  | isTyVar tv
   = case tcTyVarDetails tv of
         MetaTv { mtv_info = SigTv } -> False
         _                           -> True
-  | otherwise = True
 
 isFmvTyVar tv
   = case tcTyVarDetails tv of
@@ -909,18 +903,14 @@ isSkolemTyVar tv
         _other    -> True
 
 isOverlappableTyVar tv
-  | isTyVar tv
   = case tcTyVarDetails tv of
         SkolemTv overlappable -> overlappable
         _                     -> False
-  | otherwise = False
 
 isMetaTyVar tv
-  | isTyVar tv
   = case tcTyVarDetails tv of
         MetaTv {} -> True
         _         -> False
-  | otherwise = False
 
 -- isAmbiguousTyVar is used only when reporting type errors
 -- It picks out variables that are unbound, namely meta
@@ -928,12 +918,10 @@ isMetaTyVar tv
 -- RtClosureInspect.zonkRTTIType.  These are "ambiguous" in
 -- the sense that they stand for an as-yet-unknown type
 isAmbiguousTyVar tv
-  | isTyVar tv
   = case tcTyVarDetails tv of
         MetaTv {}     -> True
         RuntimeUnk {} -> True
         _             -> False
-  | otherwise = False
 
 isMetaTyVarTy :: TcType -> Bool
 isMetaTyVarTy (TyVarTy tv) = isMetaTyVar tv



More information about the ghc-commits mailing list