replaceTempDomainEx :: M.Map L2.L2DomainID L2.L2DomainExpression -> L2.L2DomainExpression -> L2.L2DomainExpression
replaceTempDomainEx mSubst (L2.L2DomainReference ss tmpId)
  | Just domainType <- M.lookup tmpId mSubst = domainType
replaceTempDomainEx :: M.Map L2.L2DomainID L2.L2DomainExpression -> L2.L2DomainExpression -> L2.L2DomainExpression
replaceTempDomainEx mSubst (L2.L2DomainReference ss tmpId)
  | Just domainType <- M.lookup tmpId mSubst = domainType
replaceTempDomainEx mSubst (L2.L2DomainReference ss tmpId)
  | Just domainType <- M.lookup tmpId mSubst = domainType