- = do dflags <- getDOpts
- if dopt Opt_PostfixOperators dflags
- then do (op', [arg1']) <- tcApp op 1 (tcArgs lop [arg1]) res_ty
- return (SectionL arg1' (L loc op'))
- else do (co_fn, (op', arg1'))
- <- subFunTys doc 1 res_ty Nothing
- $ \ [arg2_ty'] res_ty' ->
- tcApp op 2 (tc_args arg2_ty') res_ty'
- return (mkHsWrap co_fn (SectionL arg1' (L loc op')))
+ = do { dflags <- getDOpts
+ ; if dopt Opt_PostfixOperators dflags
+ then do { (op', [arg1']) <- tcApp op 1 (tcArgs lop [arg1]) res_ty
+ ; return (SectionL arg1' (L loc op')) }
+ else do
+ { (co_fn, expr')
+ <- subFunTys doc 1 res_ty Nothing $ \ [arg2_ty'] res_ty' ->
+ do { (op', (arg1', co_arg2)) <- tcApp op 2 (tc_args arg2_ty') res_ty'
+ ; let coi = mkFunTyCoI arg2_ty' co_arg2 res_ty' IdCo
+ ; return (mkHsWrapCoI coi (SectionL arg1' (L loc op'))) }
+ ; return (mkHsWrap co_fn expr') } }