Abstract
We present a technique to embed a functional logic language in Haskell using a GHC plugin. Our approach is based on a monadic lifting that models the functional logic semantics explicitly. Using a GHC plugin, we get many language extensions that GHC provides for free in the embedded language. As a result, we obtain a seamless embedding of a functional logic language, without having to implement a full compiler. We briefly show that our approach can be used to embed other domain-specific languages as well. Furthermore, we can use such a plugin to build a full blown compiler for our language.
Zitieren
1.
Prott K-O, Teegen F, Christiansen J. Embedding Functional Logic Programming in Haskell via a Compiler Plugin. In: Practical Aspects of Declarative Languages. Boston, MA, USA: Springer; 2023. doi:10.1017/978-3-031-24841-2_3.
Prott, K.-O. ., Teegen, F. ., & Christiansen, J. . (2023). Embedding Functional Logic Programming in Haskell via a Compiler Plugin. In Practical Aspects of Declarative Languages. Boston, MA, USA: Springer. http://doi.org/10.1017/978-3-031-24841-2_3
Prott, Kai-Oliver, Finn Teegen, und Jan Christiansen. 2023. „Embedding Functional Logic Programming in Haskell via a Compiler Plugin“. In Practical Aspects of Declarative Languages. Boston, MA, USA: Springer. doi:10.1017/978-3-031-24841-2_3.
Prott, Kai-Oliver, Finn Teegen, und Jan Christiansen. „Embedding Functional Logic Programming in Haskell via a Compiler Plugin“. Practical Aspects of Declarative Languages. Boston, MA, USA: Springer, 2023.
Prott, Kai-Oliver, u. a. „Embedding Functional Logic Programming in Haskell via a Compiler Plugin“. Practical Aspects of Declarative Languages, Springer, 2023.