-- | Translates an L1LabeleldDomains into an L2LabelledDomains.
translateLabelledDomains :: ScopeInformation -> L1.SrcSpan -> L2.L2NamespaceID ->
                            L1.L1LabelledDomains -> ModelTranslation L2.L2LabelledDomains
translateLabelledDomains scope ss nsid (L1.L1LabelledDomains ls) =
  L2.L2LabelledDomains
    <$> mapM (\(l, ex) ->
                (,) <$> translateLabelOnly "labelled domains" scope ss nsid l
                    <*> translateDomainExpression scope ss nsid ex
             ) ls
translateLabelledDomains :: ScopeInformation -> L1.SrcSpan -> L2.L2NamespaceID ->
                            L1.L1LabelledDomains -> ModelTranslation L2.L2LabelledDomains
translateLabelledDomains scope ss nsid (L1.L1LabelledDomains ls) =
  L2.L2LabelledDomains
    <$> mapM (\(l, ex) ->
                (,) <$> translateLabelOnly "labelled domains" scope ss nsid l
                    <*> translateDomainExpression scope ss nsid ex
             ) ls
translateLabelledDomains scope ss nsid (L1.L1LabelledDomains ls) =
  L2.L2LabelledDomains
    <$> mapM (\(l, ex) ->
                (,) <$> translateLabelOnly "labelled domains" scope ss nsid l
                    <*> translateDomainExpression scope ss nsid ex
             ) ls