[Haskell-cafe] GHC magic optimization ?

Miguel Mitrofanov miguelimo38 at yandex.ru
Fri Dec 4 00:58:04 EST 2009

> I will take an example:
> f x y= x+y
> The program ask the user to enter two numbers and print the sum. If  
> the
> user enter "1 2" "f 1 2=3" is stored and a gargage collector is used  
> to
> remove this dandling expression later ?

It's not stored in any way.

> If the user enter again "1 2", ghc search in dandling results to
> try to find the result without computing it again ?

No, it wouldn't. It would calculate it another time.

More information about the Haskell-Cafe mailing list