[Git][ghc/ghc][wip/T24978] Wibble

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Mon Jul 1 13:06:34 UTC 2024



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


Commits:
e5210eaa by Simon Peyton Jones at 2024-07-01T14:06:25+01:00
Wibble

- - - - -


1 changed file:

- compiler/GHC/Builtin/Types/Literals.hs


Changes:

=====================================
compiler/GHC/Builtin/Types/Literals.hs
=====================================
@@ -226,7 +226,7 @@ mkRewriteAxiom :: TyCon -> String
 mkRewriteAxiom tc str tpl_tvs lhs_tys rhs_ty
   = BIF_Rewrite
       { bifrw_name      = fsLit str
-      , bifrw_arg_roles = [Nominal, Nominal]
+      , bifrw_arg_roles = [Nominal | _ <- tpl_tvs]
       , bifrw_res_role  = Nominal
       , bifrw_match     = match_fn
       , bifrw_proves    = inst_fn }
@@ -240,7 +240,9 @@ mkRewriteAxiom tc str tpl_tvs lhs_tys rhs_ty
     inst_fn :: [TypeEqn] -> Maybe TypeEqn
     inst_fn inst_eqns
       = assertPpr (inst_eqns `equalLength` tpl_tvs) (text str $$ ppr inst_eqns) $
-        Just (mkTyConApp tc tys1 === substTy (zipTCvSubst tpl_tvs tys2) rhs_ty)
+        Just (mkTyConApp tc (substTys (zipTCvSubst tpl_tvs tys1) lhs_tys)
+              ===
+              substTy (zipTCvSubst tpl_tvs tys2) rhs_ty)
       where
         (tys1, tys2) = unzipPairs inst_eqns
 



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e5210eaa37f8f6fe8f3d6eacb8d34514ed5b3560
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/20240701/567b5290/attachment-0001.html>


More information about the ghc-commits mailing list