From e5eeb527319f4082053bc0423b5a92f6bd84dbbb Mon Sep 17 00:00:00 2001
From: sof <unknown>
Date: Fri, 25 Jul 1997 22:43:29 +0000
Subject: [PATCH] [project @ 1997-07-25 22:43:29 by sof] Use
 TysWiredIn.isIntegerTy rather than local defn of it

---
 ghc/compiler/simplCore/SimplCore.lhs | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/ghc/compiler/simplCore/SimplCore.lhs b/ghc/compiler/simplCore/SimplCore.lhs
index 60337a42fc78..1b42cc0a648a 100644
--- a/ghc/compiler/simplCore/SimplCore.lhs
+++ b/ghc/compiler/simplCore/SimplCore.lhs
@@ -55,7 +55,7 @@ import PrelVals		( unpackCStringId, unpackCString2Id,
 			  integerPlusTwoId, integerMinusOneId
 			)
 import Type		( maybeAppDataTyCon, isPrimType, SYN_IE(Type) )
-import TysWiredIn	( stringTy )
+import TysWiredIn	( stringTy, isIntegerTy )
 import LiberateCase	( liberateCase )
 import MagicUFs		( MagicUnfoldingFun )
 import Outputable	( PprStyle(..), Outputable(..){-instance * (,) -} )
@@ -692,16 +692,11 @@ litToRep (NoRepRational r rational_ty)
     (ratio_data_con, integer_ty)
       = case (maybeAppDataTyCon rational_ty) of
 	  Just (tycon, [i_ty], [con])
-	    -> ASSERT(is_integer_ty i_ty && uniqueOf tycon == ratioTyConKey)
+	    -> ASSERT(isIntegerTy i_ty && uniqueOf tycon == ratioTyConKey)
 	       (con, i_ty)
 
 	  _ -> (panic "ratio_data_con", panic "integer_ty")
 
-    is_integer_ty ty
-      = case (maybeAppDataTyCon ty) of
-	  Just (tycon, [], _) -> uniqueOf tycon == integerTyConKey
-	  _		      -> False
-
 litToRep other_lit = returnTM (literalType other_lit, Lit other_lit)
 \end{code}
 
-- 
GitLab