[Haskell-cafe] Design of a DSL in Haskell

Joerg Fritsch fritsch at joerg.cc
Sun Dec 2 15:01:46 CET 2012


This is probably a very basic question.

I am working on a DSL that eventuyally would allow me to say:

import language.cwmwl
main = runCWMWL $ do
    eval ("isFib::", 1000, ?BOOL)

I have just started to work on the interpreter-function runCWMWL and I wonder whether it is possible to escape to real Haskell somehow (and how?) either inside ot outside the do-block.

I thought of providing a defautl-wrapper for some required prelude functions (such as print) inside my interpreter but I wonder if there are more elegant ways to co-loacate a DSL and Haskell without falling back to being a normal library only.

--Joerg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121202/f887e6b2/attachment.htm>


More information about the Haskell-Cafe mailing list