[turn literal integers of primitive types directly into their final form
John Meacham <john@repetae.net>**20060425130322] {
hunk ./E/FromHs.hs 475
-    cExpr (HsLit (HsInt i)) = return $ intConvert i
+    cExpr (HsAsPat n' (HsLit (HsInt i))) = ans where
+        t' = getAssump n'
+        ty = tipe t'
+        ans = case lookupCType' dataTable ty of
+            Just (cn,st,_it) -> return $ ELit (LitCons cn [ELit (LitInt (fromIntegral i) st)] ty)
+            Nothing -> return $ intConvert' funcs ty i
+            --Just (cn,st,it) ->
+    --cExpr (HsLit (HsInt i)) = return $ intConvert i
hunk ./E/FromHs.hs 637
+intConvert' funcs typ i = EAp (EAp fun typ) (ELit (LitCons con [ELit $ LitInt (fromInteger i) (rawType rawtyp)] ltype))  where
+    (con,ltype,fun,rawtyp) = case abs i > integer_cutoff of
+        True -> (dc_Integer,tInteger,f_fromInteger,"intmax_t")
+        False -> (dc_Int,tInt,f_fromInt,"int")
+    f_fromInt = func_fromInt funcs
+    f_fromInteger = func_fromInteger funcs
+
hunk ./FrontEnd/Rename.hs 650
-renameHsExp i@(HsLit (HsInt num)) st = do
-    let fi = if abs num > 500000000 then func_fromInteger else func_fromInt
-    z <- renameHsExp fi st
-    return $ HsParen (HsApp z i)
+renameHsExp i@(HsLit (HsInt _num)) _st = do return i
+    --let fi = if abs num > 500000000 then func_fromInteger else func_fromInt
+    --z <- renameHsExp fi st
+    --return $ HsParen (HsApp z i)
hunk ./FrontEnd/Tc/Main.hs 157
+
+tiExpr (HsLit l@(HsInt _)) typ = do
+    t <- tiLit l
+    t `subsumes` typ
+    (ne,n) <- wrapInAsPat (HsLit l)
+    addToCollectedEnv (Map.singleton n typ)
+    return ne
}
