[Haskell-cafe] What is the state of the art in testing code generation?

Jake Wheat 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
> kind
> 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
Quickcheck, etc..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140712/1f16030e/attachment.html>

More information about the Haskell-Cafe mailing list