module UHC.Light.Compiler.Ty.Utils2 ( foAppLRCoeAsSubst ) where import UHC.Light.Compiler.Base.Common import UHC.Light.Compiler.Ty import UHC.Light.Compiler.Base.HsName.Builtin import UHC.Light.Compiler.Opts import UHC.Light.Compiler.VarMp import UHC.Light.Compiler.Ty.FitsInCommon import UHC.Light.Compiler.AbstractCore import UHC.Light.Compiler.Core import UHC.Light.Compiler.Core.Subst {-# LINE 24 "src/ehc/Ty/Utils2.chs" #-} foAppLRCoeAsSubst :: EHCOpts -> UID -> FIOut -> VarMp -> CSubst -> CExpr -> (CExpr,CSubst) foAppLRCoeAsSubst opts uniq fo c cs ce = (ce', foCSubst fo `cSubstApp` s1 `cSubstApp` s2) where (u',u1,u2) = mkNewLevUID2 uniq -- s0 = cs `cSubstApp` foCSubst fo (ww ,s1) = lrcoeWipeWeaveAsSubst opts u1 c (foLRCoe fo) (ce',s2) = coeEvalOnAsSubst u2 ww ce