[Haskell-cafe] manage effects in a DSL

Lindsey Kuper lindsey at composition.al
Sun Feb 2 19:55:17 UTC 2014


On Sun, Feb 2, 2014 at 2:42 PM, Corentin Dupont
<corentin.dupont at gmail.com> wrote:
> you should be able to run an effectless monad in an effectful one.
> How to encode this semantic?

In LVish we just have a `liftQD` operation that will let you lift a
deterministic computation to a quasi-deterministic one (recall that
deterministic computations can perform fewer effects):

  liftQD :: Par Det s a -> Par QuasiDet s a

So, analogously, you could have a `liftEff` and then write `liftEff
noEff`.  This is also a little bit ugly, but you may find you don't
have to do it very often (we rarely use `liftQD`).

Lindsey


More information about the Haskell-Cafe mailing list