[Haskell-cafe] Trying to write an Embedded DSL that threads a monad?
ianmbloom at gmail.com
Thu Oct 15 14:01:24 UTC 2015
Thanks for pointing that out, this is my first time encountering
tagless-final. The use of the :-> data constructor seems to solve a lot of
problems. I'm wondering how to introduce a haskell function as an embedded
value in such an EDSL but I think I will try it out.
On Thu, Oct 15, 2015 at 8:55 AM, Oleg <oleg at okmij.org> wrote:
> > Ian Bloom wrote:
> > I've been hoping to design a domain specific embedded language in
> > Haskell that would let me pipe a commutative monad throughout an
> > written in the language. Special terms within the language will
> > have access to this monad.
> Is there a reason tagless-final approach does not work for you? You
> can easily thread any monad, even if you don't make any provision for
> it initially. For example,
> uses monad to print out traces of the expression and then later to
> implement lazy evaluation for EDLS (which needs mutable cells).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe