[Git][ghc/ghc][wip/zonk-continuations] more

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Thu May 18 12:04:39 UTC 2023



Matthew Pickering pushed to branch wip/zonk-continuations at Glasgow Haskell Compiler / GHC


Commits:
b3365512 by Matthew Pickering at 2023-05-18T13:04:32+01:00
more

- - - - -


2 changed files:

- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Tc/TyCl.hs


Changes:

=====================================
compiler/GHC/CoreToStg/Prep.hs
=====================================
@@ -2108,9 +2108,9 @@ subst_tyco_mapper = TyCoMapper
   { tcm_tyvar      = \env tv -> return (lookup_tce_tv env tv)
   , tcm_covar      = \env cv -> return (lookup_tce_cv env cv)
   , tcm_hole       = \_ hole -> pprPanic "subst_co_mapper:hole" (ppr hole)
-  , tcm_tycobinder = \env tcv _vis -> if isTyVar tcv
-                                      then return (subst_tv_bndr env tcv)
-                                      else return (subst_cv_bndr env tcv)
+  , tcm_tycobinder = \env tcv _vis k -> if isTyVar tcv
+                                      then Identity (subst_tv_bndr env tcv) >>= \(env, v) -> k env v
+                                      else Identity (subst_cv_bndr env tcv) >>= \(env, v) -> k env v
   , tcm_tycon      = \tc -> return tc }
 
 subst_ty :: CpeTyCoEnv -> Type     -> Identity Type


=====================================
compiler/GHC/Tc/TyCl.hs
=====================================
@@ -878,8 +878,13 @@ swizzleTcTyConBndrs tc_infos
     swizzle_tv _ tv = return (mkTyVarTy (swizzle_var tv))
     swizzle_cv _ cv = return (mkCoVarCo (swizzle_var cv))
 
-    swizzle_bndr _ tcv _
-      = return ((), swizzle_var tcv)
+    swizzle_bndr :: ()
+      -> TyCoVar
+      -> ForAllTyFlag
+      -> (() -> TyCoVar -> Identity r)
+      -> Identity r
+    swizzle_bndr _ tcv _ k
+      = k () (swizzle_var tcv)
 
     swizzle_var :: Var -> Var
     swizzle_var v



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b3365512af93eb63f0184399783189b1efbf4bd2
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/20230518/4bb195bc/attachment-0001.html>


More information about the ghc-commits mailing list