[Git][ghc/ghc][wip/T24676] Wibbles

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Fri Jun 7 21:34:35 UTC 2024



Simon Peyton Jones pushed to branch wip/T24676 at Glasgow Haskell Compiler / GHC


Commits:
286e7acd by Simon Peyton Jones at 2024-06-07T22:34:19+01:00
Wibbles

- - - - -


2 changed files:

- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Utils/Unify.hs


Changes:

=====================================
compiler/GHC/Tc/Gen/App.hs
=====================================
@@ -406,17 +406,21 @@ tcApp rn_expr exp_res_ty
                  tcInstFun do_ql True tc_head fun_sigma rn_args
 
        ; case do_ql of
-            NoQL -> do { -- Step 4.1: subsumption check against expecte result type
+            NoQL -> do { traceTc "tcApp:NoQL" (ppr rn_fun $$ ppr app_res_rho)
+
+                         -- Step 4.1: subsumption check against expected result type
                          -- See Note [Unify with expected type before typechecking arguments]
-                         res_wrap <- checkResultTy rn_expr tc_head inst_args
+                       ; res_wrap <- checkResultTy rn_expr tc_head inst_args
                                                    app_res_rho exp_res_ty
                          -- Step 4.2: typecheck the  arguments
                        ; tc_args <- tcValArgs NoQL inst_args
                          -- Step 4.3: wrap up
                        ; finishApp tc_head tc_args app_res_rho res_wrap }
 
-            DoQL -> do { -- Step 5.1: Take a quick look at the result type
-                         quickLookResultType app_res_rho exp_res_ty
+            DoQL -> do { traceTc "tcApp:DoQL" (ppr rn_fun $$ ppr app_res_rho)
+
+                         -- Step 5.1: Take a quick look at the result type
+                       ; quickLookResultType app_res_rho exp_res_ty
                          -- Step 5.2: typecheck the arguments, and monomorphise
                          --           any un-unified instantiation variables
                        ; tc_args <- tcValArgs DoQL inst_args
@@ -1890,7 +1894,8 @@ qlUnify :: TcType -> TcType -> TcM ()
 --   * It may return without having made the argument types equal, of course;
 --     it just makes best efforts.
 qlUnify ty1 ty2
-  = go ty1 ty2
+  = do { traceTc "qlUnify" (ppr ty1 $$ ppr ty2)
+       ; go ty1 ty2 }
   where
     go :: TcType -> TcType
        -> TcM ()


=====================================
compiler/GHC/Tc/Utils/Unify.hs
=====================================
@@ -2910,7 +2910,7 @@ simpleUnifyCheck caller lhs_tv rhs
 
     fam_ok    = case caller of
                    UC_Solver    -> True
-                   UC_QuickLook -> False
+                   UC_QuickLook -> True
                    UC_OnTheFly  -> False
 
     go (TyVarTy tv)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/286e7acd3fadf5015fd0f10cc40566b0266a0a5d

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/286e7acd3fadf5015fd0f10cc40566b0266a0a5d
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240607/19d2db0d/attachment-0001.html>


More information about the ghc-commits mailing list