
Hi list, I noticed that there are some libs / packages like atom and HJscript which allow you to write a program in a haskell EDSL and that then actually generates valid source code in another language. In the above example that would be JavaScript and C. I sure would love to be able to write PHP for instance like that but I cannot even fathom how a EDSL would have to be designed for it. Could someone here point me to literature on the topic? Günther

2010/9/7 Günther Schmidt
Hi list,
I noticed that there are some libs / packages like atom and HJscript which allow you to write a program in a haskell EDSL and that then actually generates valid source code in another language. In the above example that would be JavaScript and C.
I sure would love to be able to write PHP for instance like that but I cannot even fathom how a EDSL would have to be designed for it.
Hi, Probably, the very first thing is to know what purpose the EDSL would serve. For instance, Atom is not meant as a general purpose replacement for C. Do you have something specific in mind? Cheers, Thu

Hi Günther You might want to look at Samuel Kamin's work in the first instance. This was later extended by Conal Elliott and others to use typed representations (i.e. abstract syntax) - Samuel Kamin used quasi-quoted Strings. http://loome.cs.uiuc.edu/pubs.html Particularly these two: http://loome.cs.uiuc.edu/pubs/ml-meta-extabs.pdf http://loome.cs.uiuc.edu/pubs/ml-meta.pdf
participants (3)
-
Günther Schmidt
-
Stephen Tetley
-
Vo Minh Thu