[project @ 2003-10-30 09:37:57 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcHsSyn.lhs
index 2b30c3c..dcdb63a 100644 (file)
@@ -60,7 +60,7 @@ import TcMType          ( zonkTcTyVarToTyVar, zonkType, zonkTcType, zonkTcTyVars,
 import TysPrim   ( charPrimTy, intPrimTy, floatPrimTy,
                    doublePrimTy, addrPrimTy
                  )
-import TysWiredIn ( charTy, stringTy, intTy, integerTy,
+import TysWiredIn ( charTy, stringTy, intTy, 
                    mkListTy, mkPArrTy, mkTupleTy, unitTy,
                    voidTy, listTyCon, tupleTyCon )
 import TyCon     ( mkPrimTyCon, tyConKind )
@@ -187,11 +187,10 @@ hsLitType (HsString str)   = stringTy
 hsLitType (HsStringPrim s) = addrPrimTy
 hsLitType (HsInt i)       = intTy
 hsLitType (HsIntPrim i)    = intPrimTy
-hsLitType (HsInteger i)    = integerTy
+hsLitType (HsInteger i ty) = ty
 hsLitType (HsRat _ ty)    = ty
 hsLitType (HsFloatPrim f)  = floatPrimTy
 hsLitType (HsDoublePrim d) = doublePrimTy
-hsLitType (HsLitLit _ ty)  = ty
 \end{code}
 
 %************************************************************************
@@ -363,12 +362,12 @@ zonkBinds env (MonoBind bind sigs is_rec)
     )                          `thenM` \ (env1, new_bind, _) ->
    returnM (env1, mkMonoBind is_rec new_bind)
 
-zonkBinds env (IPBinds binds is_with)
+zonkBinds env (IPBinds binds)
   = mappM zonk_ip_bind binds   `thenM` \ new_binds ->
     let
        env1 = extendZonkEnv env (map (ipNameName . fst) new_binds)
     in
-    returnM (env1, IPBinds new_binds is_with)
+    returnM (env1, IPBinds new_binds)
   where
     zonk_ip_bind (n, e)
        = mapIPNameTc (zonkIdBndr env) n        `thenM` \ n' ->
@@ -488,10 +487,6 @@ zonkExpr env (HsLit (HsRat f ty))
   = zonkTcTypeToType env ty       `thenM` \ new_ty  ->
     returnM (HsLit (HsRat f new_ty))
 
-zonkExpr env (HsLit (HsLitLit lit ty))
-  = zonkTcTypeToType env ty        `thenM` \ new_ty  ->
-    returnM (HsLit (HsLitLit lit new_ty))
-
 zonkExpr env (HsLit lit)
   = returnM (HsLit lit)
 
@@ -605,11 +600,6 @@ zonkExpr env (PArrSeqOut expr info)
     zonkArithSeq env info      `thenM` \ new_info ->
     returnM (PArrSeqOut new_expr new_info)
 
-zonkExpr env (HsCCall fun args may_gc is_casm result_ty)
-  = zonkExprs env args                 `thenM` \ new_args ->
-    zonkTcTypeToType env result_ty     `thenM` \ new_result_ty ->
-    returnM (HsCCall fun new_args may_gc is_casm new_result_ty)
-
 zonkExpr env (HsSCC lbl expr)
   = zonkExpr env expr  `thenM` \ new_expr ->
     returnM (HsSCC lbl new_expr)
@@ -838,7 +828,7 @@ zonkPat env (ConPatOut n stuff ty tvs dicts)
     let
        env1 = extendZonkEnv env new_dicts
     in
-    zonkConStuff env stuff             `thenM` \ (new_stuff, ids) ->
+    zonkConStuff env1 stuff            `thenM` \ (new_stuff, ids) ->
     returnM (ConPatOut n new_stuff new_ty new_tvs new_dicts, 
                 listToBag new_dicts `unionBags` ids)
 
@@ -958,9 +948,6 @@ zonkRule env (HsRule name act vars lhs rhs loc)
    zonk_bndr (RuleBndr v) 
        | isId v    = zonkIdBndr env v
        | otherwise = zonkTcTyVarToTyVar v
-
-zonkRule env (IfaceRuleOut fun rule)
-  = returnM (IfaceRuleOut (zonkIdOcc env fun) rule)
 \end{code}