diff options
author | Richard Eisenberg <rae@richarde.dev> | 2022-03-30 21:37:56 +0000 |
---|---|---|
committer | Richard Eisenberg <rae@richarde.dev> | 2022-03-30 21:37:56 +0000 |
commit | 6b282ba2c704d23e0f0224b98816342bc8a6e90d (patch) | |
tree | e1e57813df8be876f1c2ee7666980afebab684c7 /compiler/GHC/Core/Coercion.hs | |
parent | 9619ffba9ca9f001f64a67fde2f26b1a69c5b9f4 (diff) | |
download | haskell-wip/zapzapzap.tar.gz |
Zonk coercion holes correctly; a few other fixes.wip/zapzapzap
Non-perf tests pass. Now let's see the real results!
Diffstat (limited to 'compiler/GHC/Core/Coercion.hs')
-rw-r--r-- | compiler/GHC/Core/Coercion.hs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/compiler/GHC/Core/Coercion.hs b/compiler/GHC/Core/Coercion.hs index 4e13e02bc7..861a0002a7 100644 --- a/compiler/GHC/Core/Coercion.hs +++ b/compiler/GHC/Core/Coercion.hs @@ -126,7 +126,13 @@ module GHC.Core.Coercion ( hasCoercionHoleTy, hasCoercionHoleCo, hasThisCoercionHoleTy, - setCoHoleType + setCoHoleType, + + FreeCoVarsHoles, + mkFreeCoVarsHoles, updateFreeCoVars, updateFreeCoVarsM, + sizeFreeCoVarsHoles, + freeCoVars, freeCoHoles, + ) where import {-# SOURCE #-} GHC.CoreToIface (toIfaceTyCon, tidyToIfaceTcArgs) @@ -1337,7 +1343,7 @@ mkProofIrrelCo r kco g1 g2 = mkUnivCo (ProofIrrelProv kco) r (mkCoercionTy g1) (mkCoercionTy g2) -- | TODO (RAE): Comment -mkZappedCo :: Role -> Type -> Type -> DCoVarSet -> Coercion +mkZappedCo :: Role -> Type -> Type -> FreeCoVarsHoles -> Coercion mkZappedCo = ZappedCo {- @@ -2347,7 +2353,7 @@ seqCo (InstCo co arg) = seqCo co `seq` seqCo arg seqCo (KindCo co) = seqCo co seqCo (SubCo co) = seqCo co seqCo (AxiomRuleCo _ cs) = seqCos cs -seqCo (ZappedCo r t1 t2 cvs) = r `seq` seqType t1 `seq` seqType t2 `seq` seqDVarSet cvs +seqCo (ZappedCo r t1 t2 _vs) = r `seq` seqType t1 `seq` seqType t2 seqProv :: UnivCoProvenance -> () seqProv (PhantomProv co) = seqCo co @@ -2776,4 +2782,4 @@ hasThisCoercionHoleTy ty hole = Monoid.getAny (f ty) -- | Set the type of a 'CoercionHole' setCoHoleType :: CoercionHole -> Type -> CoercionHole -setCoHoleType h t = setCoHoleCoVar h (setVarType (coHoleCoVar h) t) +setCoHoleType h t = setCoHoleCoVar h (setVarType (coHoleCoVar h) t)
\ No newline at end of file |