[Git][ghc/ghc][wip/T20666] Wibbles
Simon Peyton Jones (@simonpj)
gitlab at gitlab.haskell.org
Thu Dec 22 17:41:57 UTC 2022
Simon Peyton Jones pushed to branch wip/T20666 at Glasgow Haskell Compiler / GHC
Commits:
1f33348e by Simon Peyton Jones at 2022-12-22T17:41:34+00:00
Wibbles
- - - - -
1 changed file:
- compiler/GHC/Tc/TyCl/Instance.hs
Changes:
=====================================
compiler/GHC/Tc/TyCl/Instance.hs
=====================================
@@ -1252,8 +1252,7 @@ tcInstDecl2 (InstInfo { iSpec = ispec, iBinds = ibinds })
<- pushTcLevelM $
do { (sc_ids, sc_binds, sc_implics)
<- tcSuperClasses skol_info dfun_id clas inst_tyvars
- dfun_ev_vars inst_tys dfun_ev_binds
- sc_theta'
+ dfun_ev_vars dfun_ev_binds sc_theta'
-- Typecheck the methods
; (meth_ids, meth_binds, meth_implics)
@@ -1439,7 +1438,7 @@ Notice that
-}
tcSuperClasses :: SkolemInfoAnon -> DFunId -> Class -> [TcTyVar]
- -> [EvVar] -> [TcType]
+ -> [EvVar]
-> TcEvBinds
-> TcThetaType
-> TcM ([EvVar], LHsBinds GhcTc, Bag Implication)
@@ -1451,7 +1450,7 @@ tcSuperClasses :: SkolemInfoAnon -> DFunId -> Class -> [TcTyVar]
-- See Note [Recursive superclasses] for why this is so hard!
-- In effect, we build a special-purpose solver for the first step
-- of solving each superclass constraint
-tcSuperClasses skol_info dfun_id cls tyvars dfun_evs inst_tys dfun_ev_binds sc_theta
+tcSuperClasses skol_info dfun_id cls tyvars dfun_evs dfun_ev_binds sc_theta
= do { (ids, binds, implics) <- mapAndUnzip3M tc_super (zip sc_theta [fIRST_TAG..])
; return (ids, listToBag binds, listToBag implics) }
where
@@ -1547,7 +1546,7 @@ generate a guaranteed-non-bottom superclass witness from:
(sc1) one of the dictionary arguments itself (all non-bottom)
(sc2) an immediate superclass of a dictionary that is Paterson-smaller
than the instance head
- See Note [The Paterson size of a type] in GHC.Tc.Utils.TcType
+ See Note [The PatersonSize of a type] in GHC.Tc.Utils.TcType
(sc3) a call of a dfun (always returns a dictionary constructor)
The tricky case is (sc2). We proceed by induction on the size of the
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1f33348ea43ef617a02daa3636cf118c8b2afaf5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1f33348ea43ef617a02daa3636cf118c8b2afaf5
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/20221222/ded8fe99/attachment-0001.html>
More information about the ghc-commits
mailing list