Implict parameters and monomorphism

Rishiyur S. Nikhil nikhil@acm.org
Wed, 02 May 2001 21:19:57 -0400


John Hughes wrote:
> ... Function bodies are clearly evaluated many times, once for each
> call, but non-function bindings should be evaluated at most once to respect
> call-by-need semantics.

Isn't this a very fragile distinction?  It seems so susceptible
to routine program transformations by both programmers and
compilers (e.g., lambda lifting/unlifting, which can change
a non-function finding into a function binding and vice versa).

Also, I agree with Andreas Rossberg's observation: 

>  ... the Haskell Report ... does not even
>  demand call-by-need evaluation (it only speaks of non-strict
>  semantics).

Nikhil