[Git][ghc/ghc][wip/T24978] 2 commits: Comments only
Simon Peyton Jones (@simonpj)
gitlab at gitlab.haskell.org
Mon Jul 1 16:36:19 UTC 2024
Simon Peyton Jones pushed to branch wip/T24978 at Glasgow Haskell Compiler / GHC
Commits:
b2e767d1 by Simon Peyton Jones at 2024-07-01T17:33:59+01:00
Comments only
- - - - -
86fc6631 by Simon Peyton Jones at 2024-07-01T17:36:01+01:00
Clerical error
- - - - -
1 changed file:
- compiler/GHC/Builtin/Types/Literals.hs
Changes:
=====================================
compiler/GHC/Builtin/Types/Literals.hs
=====================================
@@ -302,10 +302,12 @@ mkInteractBinFamDeduction str fam_tc f
, bifint_arg_roles = [Nominal, Nominal]
, bifint_res_role = Nominal
, bifint_proves = \cs -> do { [Pair lhs1 rhs1, Pair lhs2 rhs2] <- return cs
+-- ; same rhs1 rhs2
; (tc1, [x1,y1]) <- splitTyConApp_maybe lhs1
; (tc2, [x2,y2]) <- splitTyConApp_maybe lhs2
; massertPpr (tc1 == fam_tc) (ppr tc1 $$ ppr fam_tc)
; massertPpr (tc2 == fam_tc) (ppr tc2 $$ ppr fam_tc)
+-- ; f x1 y1 x2 y2 } }
; f x1 y1 rhs1 x2 y2 rhs2 } }
@@ -402,13 +404,13 @@ axAddInteracts :: [BuiltInFamInteract]
axAddInteracts
= map mk_ax $
[ ("AddI-xr", \ x1 y1 z1 x2 y2 z2 -> injCheck x1 x2 z1 z2 y1 y2)
- -- (x1+y1~z, x2+y2~z) {x1=x2}=> (y1 ~ y2)
+ -- (x1+y1~z1, x2+y2~z2) {x1=x2,z1=z2}=> (y1 ~ y2)
, ("AddI-xr2", \ x1 y1 z1 x2 y2 z2 -> injCheck x2 y1 z1 z2 x1 y2)
- -- (x1+y1~z, x2+y2~z) {x2=y1}=> (x1 ~ y2)
+ -- (x1+y1~z1, x2+y2~z2) {x2=y1,z1=z2}=> (x1 ~ y2)
, ("AddI-yr", \ x1 y1 z1 x2 y2 z2 -> injCheck y1 y2 z1 z2 x1 x2)
- -- (x1+y1~z, x2+y2~z) {y1=y2}=> (x1 ~ x2)
+ -- (x1+y1~z1, x2+y2~z2) {y1=y2,z1=z2}=> (x1 ~ x2)
, ("AddI-yr2", \ x1 y1 z1 x2 y2 z2 -> injCheck x1 y2 z1 z2 y1 x2)
- -- (x1+y1~z, x2+y2~z) {x1=y2}=> (y1 ~ x2)
+ -- (x1+y1~z1, x2+y2~z2) {x1=y2,z1=z2}=> (y1 ~ x2)
]
where
mk_ax (str, fun) = mkInteractBinFamDeduction str typeNatAddTyCon fun
@@ -571,7 +573,7 @@ axDivMatches
, mkBinConstFoldAxiom tc "DivDef" isNumLitTy isNumLitTy $ -- 8 `div` 4 --> 2
\x y -> do { guard (y /= 0); return (num (div x y)) } ]
where
- tc = typeNatModTyCon
+ tc = typeNatDivTyCon
axModMatches :: [BuiltInFamRewrite]
axModMatches
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e4d078abb7c84a099c09f54a87669bc3e2a14138...86fc6631f87e418e16f5bf852cad9bf5edb966d9
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e4d078abb7c84a099c09f54a87669bc3e2a14138...86fc6631f87e418e16f5bf852cad9bf5edb966d9
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/e79e758d/attachment-0001.html>
More information about the ghc-commits
mailing list