[project @ 2000-05-24 11:37:41 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcIfaceSig.lhs
index 57ff4c0..cd5d05c 100644 (file)
@@ -31,7 +31,7 @@ import CoreUtils      ( exprType )
 import CoreUnfold
 import CoreLint                ( lintUnfolding )
 import WorkWrap                ( mkWrapper )
-import PrimOp          ( PrimOp(..), CCall(..), CCallTarget(..) )
+import PrimOp          ( PrimOp(..) )
 
 import Id              ( Id, mkId, mkVanillaId,
                          isDataConWrapId_maybe
@@ -96,7 +96,7 @@ tcIdInfo unf_env in_scope_vars name ty info info_ins
                -- is never inspected; so the typecheck doesn't even happen
                unfold_info = case maybe_expr' of
                                Nothing    -> noUnfolding
-                               Just expr' -> mkTopUnfolding (cprInfo info) expr' 
+                               Just expr' -> mkTopUnfolding expr' 
                info1 = info `setUnfoldingInfo` unfold_info
                info2 = info1 `setInlinePragInfo` inline_prag
          in
@@ -119,7 +119,7 @@ tcWorkerInfo unf_env ty info worker_name
     let
        -- Watch out! We can't pull on unf_env too eagerly!
        info' = case explicitLookupValue unf_env worker_name of
-                       Just worker_id -> info `setUnfoldingInfo`  mkTopUnfolding cpr_info (wrap_fn worker_id)
+                       Just worker_id -> info `setUnfoldingInfo`  mkTopUnfolding (wrap_fn worker_id)
                                                `setWorkerInfo`     HasWorker worker_id arity
 
                        Nothing        -> pprTrace "tcWorkerInfo failed:" (ppr worker_name) info
@@ -341,11 +341,11 @@ tcCoreAlt scrut_ty (UfDataAlt con_name, names, rhs)
 
        (main_tyvars, _, ex_tyvars, _, _, _) = dataConSig con
 
-       (tycon, inst_tys, cons) = splitAlgTyConApp scrut_ty
-       ex_tyvars'              = [mkTyVar name (tyVarKind tv) | (name,tv) <- names `zip` ex_tyvars] 
-       ex_tys'                 = mkTyVarTys ex_tyvars'
-       arg_tys                 = dataConArgTys con (inst_tys ++ ex_tys')
-       id_names                = drop (length ex_tyvars) names
+       (_, inst_tys, cons) = splitAlgTyConApp scrut_ty
+       ex_tyvars'          = [mkTyVar name (tyVarKind tv) | (name,tv) <- names `zip` ex_tyvars] 
+       ex_tys'             = mkTyVarTys ex_tyvars'
+       arg_tys             = dataConArgTys con (inst_tys ++ ex_tys')
+       id_names            = drop (length ex_tyvars) names
        arg_ids
 #ifdef DEBUG
                | length id_names /= length arg_tys