Re: [Haskell-cafe] My Unification Sorrows

2007-04-04 Thread Paul Berg
Also, the random backtracker isn't truly random.. it clusters solutions. the head should be completely random each time though. On 4/4/07, Stefan O'Rear <[EMAIL PROTECTED]> wrote: On Wed, Apr 04, 2007 at 07:16:35PM -0700, Paul Berg wrote: > I believe I may have found a solution (I *think* it's

Re: [Haskell-cafe] My Unification Sorrows

2007-04-04 Thread Paul Berg
This solution is invalid for some edge cases. Better than quickcheck, I can map eval across all possible trees of depth n, since growFullTree returns a lazy list of all trees. On 4/4/07, Stefan O'Rear <[EMAIL PROTECTED]> wrote: On Wed, Apr 04, 2007 at 07:16:35PM -0700, Paul Berg wrote: > I beli

Re: [Haskell-cafe] My Unification Sorrows

2007-04-04 Thread Stefan O'Rear
On Wed, Apr 04, 2007 at 07:16:35PM -0700, Paul Berg wrote: > I believe I may have found a solution (I *think* it's correct): > > The occurs check needs to stay, but be modified for infinite types. > When the occurs check is true, instead of failing, we should keep the > constraint, but skip perfor

Re: [Haskell-cafe] My Unification Sorrows

2007-04-04 Thread Paul Berg
I believe I may have found a solution (I *think* it's correct): The occurs check needs to stay, but be modified for infinite types. When the occurs check is true, instead of failing, we should keep the constraint, but skip performing substitution on the rest of the list of constraints. This allo

Re: [Haskell-cafe] My Unification Sorrows

2007-04-04 Thread Stefan O'Rear
I seem to have did an accidental reply-to-sender at first: On Wed, Apr 04, 2007 at 01:37:44PM -0700, Paul Berg wrote: > Ok, so I decided to implement an algorithm to build Strongly Typed Genetic > Programming trees in Haskell, in an effort to learn Haskell, > and I'm way over my head on this unifi

Re: [Haskell-cafe] My Unification Sorrows

2007-04-04 Thread Stefan O'Rear
I received the file with seriously damaged layout; in case anyone else has the same issue, I've hosted a cleaned up version: http://members.cox.net/stefanor/Procyon.hs Stefan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/

[Haskell-cafe] My Unification Sorrows

2007-04-04 Thread Paul Berg
Ok, so I decided to implement an algorithm to build Strongly Typed Genetic Programming trees in Haskell, in an effort to learn Haskell, and I'm way over my head on this unification problem. The unification seems to work well, as long as I include the occurs check. growFullTree returns a lazy list