diff options
Diffstat (limited to 'compiler/GHC/Tc/Gen/App.hs')
-rw-r--r-- | compiler/GHC/Tc/Gen/App.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/GHC/Tc/Gen/App.hs b/compiler/GHC/Tc/Gen/App.hs index 76fdb7c5f5..4fee7b1a6e 100644 --- a/compiler/GHC/Tc/Gen/App.hs +++ b/compiler/GHC/Tc/Gen/App.hs @@ -138,7 +138,7 @@ tcInferSigma inst (L loc rn_expr) = addExprCtxt rn_expr $ setSrcSpanA loc $ do { do_ql <- wantQuickLook rn_fun - ; (_tc_fun, fun_sigma) <- tcInferAppHead fun rn_args Nothing + ; (_tc_fun, fun_sigma) <- tcInferAppHead fun rn_args ; (_delta, inst_args, app_res_sigma) <- tcInstFun do_ql inst fun fun_sigma rn_args ; _tc_args <- tcValArgs do_ql inst_args ; return app_res_sigma } @@ -163,7 +163,7 @@ app :: head | {-# PRAGMA #-} app -- HsPragE: pragmas head ::= f -- HsVar: variables - | fld -- HsRecFld: record field selectors + | fld -- HsRecSel: record field selectors | (expr :: ty) -- ExprWithTySig: expr with user type sig | lit -- HsOverLit: overloaded literals | other_expr -- Other expressions @@ -226,7 +226,7 @@ tcApp works like this: 2. Use tcInferAppHead to infer the type of the function, as an (uninstantiated) TcSigmaType There are special cases for - HsVar, HsRecFld, and ExprWithTySig + HsVar, HsRecSel, and ExprWithTySig Otherwise, delegate back to tcExpr, which infers an (instantiated) TcRhoType @@ -311,7 +311,6 @@ tcApp :: HsExpr GhcRn -> ExpRhoType -> TcM (HsExpr GhcTc) tcApp rn_expr exp_res_ty | (fun@(rn_fun, fun_ctxt), rn_args) <- splitHsApps rn_expr = do { (tc_fun, fun_sigma) <- tcInferAppHead fun rn_args - (checkingExpType_maybe exp_res_ty) -- Instantiate ; do_ql <- wantQuickLook rn_fun @@ -852,7 +851,7 @@ quickLookArg1 :: Bool -> Delta -> LHsExpr GhcRn -> TcSigmaType -> TcM (Delta, EValArg 'TcpInst) quickLookArg1 guarded delta larg@(L _ arg) arg_ty = do { let (fun@(rn_fun, fun_ctxt), rn_args) = splitHsApps arg - ; mb_fun_ty <- tcInferAppHead_maybe rn_fun rn_args (Just arg_ty) + ; mb_fun_ty <- tcInferAppHead_maybe rn_fun rn_args ; traceTc "quickLookArg 1" $ vcat [ text "arg:" <+> ppr arg , text "head:" <+> ppr rn_fun <+> dcolon <+> ppr mb_fun_ty |