-- | Translates an L1DomainExpression to an L2DomainExpression, and also returns the scope inside the outermost
--   domain expression.
translateDomainExpressionCrossScope :: ScopeInformation -> L1.SrcSpan -> L2.L2NamespaceID -> L1.L1DomainExpression -> ModelTranslation (L2.L2DomainExpression, ScopeInformation)
translateDomainExpressionCrossScope scope _ nsid (L1.L1DomainExpressionProduct ss labels) =
  (,) <$> (L2.L2DomainExpressionProduct ss <$>  translateLabelledDomains scope ss nsid labels) <*> (pure scope)
translateDomainExpressionCrossScope :: ScopeInformation -> L1.SrcSpan -> L2.L2NamespaceID -> L1.L1DomainExpression -> ModelTranslation (L2.L2DomainExpression, ScopeInformation)
translateDomainExpressionCrossScope scope _ nsid (L1.L1DomainExpressionProduct ss labels) =
  (,) <$> (L2.L2DomainExpressionProduct ss <$>  translateLabelledDomains scope ss nsid labels) <*> (pure scope)
translateDomainExpressionCrossScope scope _ nsid (L1.L1DomainExpressionProduct ss labels) =
  (,) <$> (L2.L2DomainExpressionProduct ss <$>  translateLabelledDomains scope ss nsid labels) <*> (pure scope)