Re: [Haskell-cafe] Logic programming using lazy evaluation

2007-02-28 Thread Henning Thielemann
On Tue, 27 Feb 2007, Chris Kuklewicz wrote: Accessing variable values by integer identifiers means that the garbage collector cannot free values that are no longer needed. That will always be true for potentially non-finite lists of equations. Here is some implementation that creates and

Re: [Haskell-cafe] Logic programming using lazy evaluation

2007-02-28 Thread Henning Thielemann
On Tue, 27 Feb 2007, Chris Kuklewicz wrote: For an infinite number of equations you have to generate them as data at run time. Your notation above only works for a finite set of equations known at compile time. So you have a stream of equations, and each equation depends on some subset of

Re: [Haskell-cafe] Logic programming using lazy evaluation

2007-02-27 Thread Ulf Norell
On 2/27/07, Henning Thielemann [EMAIL PROTECTED] wrote: I suspect that someone has already done this: A Haskell library which solves a system of simple equations, where it is only necessary to derive a value from an equation where all but one variables are determined. Say You might want to

Re: [Haskell-cafe] Logic programming using lazy evaluation

2007-02-27 Thread Henning Thielemann
On Tue, 27 Feb 2007, Ulf Norell wrote: On 2/27/07, Henning Thielemann [EMAIL PROTECTED] wrote: I suspect that someone has already done this: A Haskell library which solves a system of simple equations, where it is only necessary to derive a value from an equation where all but one

Re: [Haskell-cafe] Logic programming using lazy evaluation

2007-02-27 Thread Chris Kuklewicz
Henning Thielemann wrote: I suspect that someone has already done this: A Haskell library which solves a system of simple equations, where it is only necessary to derive a value from an equation where all but one variables are determined. Say 1+2=x -- add 1 2 x y*z=20 -- times y z