Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Tc/Gen/App.hs
    ... ... @@ -854,7 +854,8 @@ tcInstFun do_ql inst_final fun_orig (tc_fun, rn_fun, fun_ctxt) fun_sigma rn_args
    854 854
         -- Rule IARG from Fig 4 of the QL paper:
    
    855 855
         go1 pos acc fun_ty
    
    856 856
             (EValArg { ea_arg = arg, ea_ctxt = ctxt } : rest_args)
    
    857
    -      = do { let herald = ExpectedFunTyArg (HsExprTcThing tc_fun) (unLoc arg)
    
    857
    +      = do { let herald | DoOrigin <- fun_orig = ExpectedFunTySyntaxOp fun_orig tc_fun -- cf. RepPolyDoBind.hs
    
    858
    +                        | otherwise = ExpectedFunTyArg (HsExprTcThing tc_fun) (unLoc arg)
    
    858 859
                ; (wrap, arg_ty, res_ty) <-
    
    859 860
                     -- NB: matchActualFunTy does the rep-poly check.
    
    860 861
                     -- For example, suppose we have f :: forall r (a::TYPE r). a -> Int