tfm is "tagless final macro" - the project is intended to eliminate the boilerplate associated with setting up an EDSL encoded in the finally tagless approach, specifically the approach taken in this article.
- For algebras with effectful parameters (e.g. have shape
F[_]) the macro will replace each occurence of
Fwith the name of the algebra. However, if the
F[_]appears as part of a more complex type (e.g.
A => F[B]), the macro cannot figure out how to make the appropriate interpreter call and will fail.
- Alternatives to GADTs in Scala
- The generated code is taken from this post
- Typed Tagless Interpretations
- Folding Domain-Specific Languages: Deep and Shallow Embeddings
- Combining Deep and Shallow Embedding for EDSL
Code is provided under the MIT license available at http://opensource.org/licenses/MIT, as well as the LICENSE file.