synthExpr defs gam pol (Val s _ (Promote _ e)) = do
   debugM "Synthing a promotion of " $ pretty e

   -- Create a fresh kind variable for this coeffect
   vark <- freshIdentifierBase $ "kprom_[" <> pretty (startPos s) <> "]"
   -- remember this new kind variable in the kind environment
   modify (\st -> st { tyVarContext = (mkId vark, (KCoeffect, InstanceQ)) : tyVarContext st })

   -- Create a fresh coeffect variable for the coeffect of the promoted expression
   var <- freshTyVarInContext (mkId $ "prom_[" <> pretty (startPos s) <> "]") (KPromote $ TyVar $ mkId vark)

   gamF <- discToFreshVarsIn s (freeVars e) gam (CVar var)

   (t, gam', subst, elaboratedE) <- synthExpr defs gamF pol e

   let finalTy = Box (CVar var) t
   let elaborated = Val s finalTy (Promote t elaboratedE)

   gam'' <- multAll s (freeVars e) (CVar var) gam'
   return (finalTy, gam'', subst, elaborated)


-- BinOp
synthExpr defs gam pol (Val s _ (Promote _ e)) = do
   debugM "Synthing a promotion of " $ pretty e

   -- Create a fresh kind variable for this coeffect
   vark <- freshIdentifierBase $ "kprom_[" <> pretty (startPos s) <> "]"
   -- remember this new kind variable in the kind environment
   modify (\st -> st { tyVarContext = (mkId vark, (KCoeffect, InstanceQ)) : tyVarContext st })

   -- Create a fresh coeffect variable for the coeffect of the promoted expression
   var <- freshTyVarInContext (mkId $ "prom_[" <> pretty (startPos s) <> "]") (KPromote $ TyVar $ mkId vark)

   gamF <- discToFreshVarsIn s (freeVars e) gam (CVar var)

   (t, gam', subst, elaboratedE) <- synthExpr defs gamF pol e

   let finalTy = Box (CVar var) t
   let elaborated = Val s finalTy (Promote t elaboratedE)

   gam'' <- multAll s (freeVars e) (CVar var) gam'
   return (finalTy, gam'', subst, elaborated)


-- BinOp
synthExpr defs gam pol (Val s _ (Promote _ e)) = do
   debugM "Synthing a promotion of " $ pretty e

   -- Create a fresh kind variable for this coeffect
   vark <- freshIdentifierBase $ "kprom_[" <> pretty (startPos s) <> "]"
   -- remember this new kind variable in the kind environment
   modify (\st -> st { tyVarContext = (mkId vark, (KCoeffect, InstanceQ)) : tyVarContext st })

   -- Create a fresh coeffect variable for the coeffect of the promoted expression
   var <- freshTyVarInContext (mkId $ "prom_[" <> pretty (startPos s) <> "]") (KPromote $ TyVar $ mkId vark)

   gamF <- discToFreshVarsIn s (freeVars e) gam (CVar var)

   (t, gam', subst, elaboratedE) <- synthExpr defs gamF pol e

   let finalTy = Box (CVar var) t
   let elaborated = Val s finalTy (Promote t elaboratedE)

   gam'' <- multAll s (freeVars e) (CVar var) gam'
   return (finalTy, gam'', subst, elaborated)


-- BinOp