Remove redundant fromIntegral calls
[ghc-hetmet.git] / compiler / deSugar / DsMeta.hs
index 8bb7133..3659498 100644 (file)
@@ -53,6 +53,7 @@ import TcType
 import TyCon
 import TysWiredIn
 import CoreSyn
+import MkCore
 import CoreUtils
 import SrcLoc
 import Unique
@@ -1249,7 +1250,7 @@ repNamedTyCon (MkC s) = rep2 conTName [s]
 
 repTupleTyCon :: Int -> DsM (Core TH.TypeQ)
 -- Note: not Core Int; it's easier to be direct here
-repTupleTyCon i = rep2 tupleTName [mkIntExpr (fromIntegral i)]
+repTupleTyCon i = rep2 tupleTName [mkIntExprInt i]
 
 repArrowTyCon :: DsM (Core TH.TypeQ)
 repArrowTyCon = rep2 arrowTName []
@@ -1303,6 +1304,7 @@ repOverloadedLiteral (OverLit { ol_val = val})
        -- the smart constructor 'TH.Syntax.rationalL' uses it in its type,
        -- and rationalL is sucked in when any TH stuff is used
 
+mk_lit :: OverLitVal -> DsM HsLit
 mk_lit (HsIntegral i)   = mk_integer  i
 mk_lit (HsFractional f) = mk_rational f
 mk_lit (HsIsString s)   = mk_string   s
@@ -1343,7 +1345,7 @@ coreStringLit :: String -> DsM (Core String)
 coreStringLit s = do { z <- mkStringExpr s; return(MkC z) }
 
 coreIntLit :: Int -> DsM (Core Int)
-coreIntLit i = return (MkC (mkIntExpr (fromIntegral i)))
+coreIntLit i = return (MkC (mkIntExprInt i))
 
 coreVar :: Id -> Core TH.Name  -- The Id has type Name
 coreVar id = MkC (Var id)