
On 8/2/07, Daniel McAllansmith
On Wednesday 01 August 2007 17:44, Thomas Conway wrote:
This sounds like a common problem type. Is there a well known solution to this sort of problem?
Have you looked into Tying the Knot? http://www.haskell.org/haskellwiki/Tying_the_Knot
I'll need to look further, but I'd say this looks to be on the money. In many ways it's isomorphic to the logic variable solution (in Prolog) - it works so long as you don't look at the binding before the symbol table is complete (i.e. at the end of parsing). Neat. Except that the Haskell one does not require evil like var/1 to determine that there are missing bindings. That's pleasing - I knew I walked away from Prolog for a good reason[*]. T. [*] It did take a while though - my first Prolog interpreter was MicroProlog on the Sinclair Spectrum. And that was circa 1980. :-) -- Dr Thomas Conway drtomc@gmail.com Silence is the perfectest herald of joy: I were but little happy, if I could say how much.