I have a tiny DSL that actually works quite well. When I say 

import language.CWMWL

main = runCWMWL $ do
    out (matrixMult, A, 1, row, matrix-row)

then runCWMWL is a function that is exported by language.CWMWL. This parses the 
experession and takes some action.

Now, A is the name of the matrix and the third tuple element would represent 
the numbe of the row. For example 1 to 10000. I want to achieve some sort of 
"elegant" (means readable code, a good representation) recursion that would let 
me do something like 
   sequence [ out (matrixMult, A, n, row, matrix-row) | n <- [1..1000] ] 
but in a nicer manner an without expending this to 10000 lines of code at 
compile time.

How can I best introduce recursion into my DSL or borrow this from the host 
language Haskell "effectively"? 

--Joerg



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to