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 )
-> 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
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}
-- 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"))
}