[Haskell-cafe] Trying to write an Embedded DSL that threads a monad?

Ian Bloom 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.

Thanks,
Ian

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
> expression
> > written in the language. Special terms within the language will
> eventually
> > 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,
>
>         http://okmij.org/ftp/tagless-final/index.html#call-by-any
>         http://okmij.org/ftp/tagless-final/course/CBAny.hs
>
> uses monad to print out traces of the expression and then later to
> implement lazy evaluation for EDLS (which needs mutable cells).
>
>
>


-- 
718.755.5483
http://ianbloom.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151015/60e4a20c/attachment.html>


More information about the Haskell-Cafe mailing list