[Haskell-cafe] I love purity, but it's killing me.

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Feb 8 02:09:16 EST 2008

Hello Tom,

Friday, February 8, 2008, 9:33:35 AM, you wrote:

> The process of converting an expression tree to a graph uses either Eq
> or Ord (either derived or a custom instance) to search and build a set
> of unique nodes to be ordered for execution.

in similar situation, i've added hash field to each node, initialized
by smart constructor:

data Expression = Add Hash Expression Expression | ...
type Hash=Int

add x y = Add (x*y+1234567) x y

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list