Abstract

Generative programming techniques allow a range of domain-specific languages (DSLs) to be homogeneously embedded into richer host languages by effectively reusing its parser, type checker and compiler. The interoperability between multiple DSLs is, however, not well-defined and oftentimes restricted to provide safety guarantees. We discuss some of the issues faced when trying to compose multiple DSLs homogeneously embedded using Template Haskell. We finally discuss a formalization of homogeneous language embeddings called the mu-calculus which allows parameterisable language embeddings to be specified and analysed. It facilitates the definition of multiple, expressive language embeddings in a homogeneous embedding context and shows how to define polymorphic variant calculi with safety guarantees.