[project @ 2005-05-12 16:51:03 by simonpj]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcExpr.lhs
index 6d441b2..4cdf5b5 100644 (file)
@@ -32,7 +32,7 @@ import BasicTypes     ( isMarkedStrict )
 import Inst            ( tcOverloadedLit, newMethodFromName, newIPDict,
                          newDicts, newMethodWithGivenTy, tcInstStupidTheta, tcInstCall )
 import TcBinds         ( tcBindsAndThen )
-import TcEnv           ( tcLookup, tcLookupId, checkProcLevel,
+import TcEnv           ( tcLookup, tcLookupId,
                          tcLookupDataCon, tcLookupGlobalId
                        )
 import TcArrows                ( tcProc )
@@ -88,7 +88,7 @@ tcCheckSigma :: LHsExpr Name          -- Expession to type check
                     -> TcM (LHsExpr TcId)      -- Generalised expr with expected type
 
 tcCheckSigma expr expected_ty 
-  = traceTc (text "tcExpr" <+> (ppr expected_ty $$ ppr expr)) `thenM_`
+  = -- traceTc (text "tcExpr" <+> (ppr expected_ty $$ ppr expr)) `thenM_`
     tc_expr' expr expected_ty
 
 tc_expr' expr sigma_ty
@@ -266,7 +266,7 @@ tcExpr in_expr@(OpApp arg1 op fix arg2) res_ty
     tcArg op (arg2, arg2_ty, 2)                        `thenM` \ arg2' ->
     addErrCtxt (exprCtxt in_expr)              $
     tcSubExp res_ty op_res_ty                  `thenM` \ co_fn ->
-    returnM (OpApp arg1' op' fix arg2')
+    returnM (co_fn <$> OpApp arg1' op' fix arg2')
 \end{code}
 
 \begin{code}
@@ -787,9 +787,7 @@ tcId orig id_name   -- Look up the Id and instantiate its type
                -- A global cannot possibly be ill-staged
                -- nor does it need the 'lifting' treatment
 
-    ;  ATcId id th_level proc_level 
-         -> do { checkProcLevel id proc_level
-               ; tc_local_id id th_level }
+    ;  ATcId id th_level -> tc_local_id id th_level
 
     ;  other -> failWithTc (ppr other <+> ptext SLIT("used where a value identifer was expected"))
     }