On Wed, 20 Jul 2011 12:48:48 -0300
Thiago Negri <evoh...@gmail.com> wrote:


> Is it possible to implement (==) that first check these thunks before
> evaluating it? (Considering both arguments has pure types).
> 
> 
> E.g.,
> 
> Equivalent thunks, evaluates to True, does not need to evaluate its
> arguments: [1..] == [1..]
> 
> 

Thunks are just expressions and equality of expressions is undecidable
in any Turing-complete language (like any general-purpose programming
language). Note that syntactical equality is not sufficient because
(==) should be referentially transparent.

Pedro

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to