

Enumerating a context-free language; introducing the Omega monad - mbrubeck
http://lukepalmer.wordpress.com/2008/05/02/enumerating-a-context-free-language/

======
finnw
Get a copy of this book if you can:

<http://www.palgrave.com/products/title.aspx?is=0333992857>

Chapter 9 describes a set of combinators for logic programming in Haskell,
covering both your examples and more.

