[Haskell-cafe] What is the state of the art in testing code generation?
jakewheatmail at gmail.com
Sat Jul 12 08:08:51 UTC 2014
> Is this the best we can do in Haskell? Certainly it seems hard to use a
> QuickCheck/SmallCheck approach for this purpose. Is there any way this
> of testing can be automated or made more robust?
You could make a simple AST which can be used to generate SQL query
text directly, and also the Haskell source code for your DSL. Then you
can compare the results of the two code paths 'AST -> concrete SQL'
and 'AST -> generate Haskell -> run the Haskell -> concrete SQL'. If
you can get this working then this could make it easier to use
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe