[Haskell-cafe] WHNF versus HNF
Tillmann Rendel
rendel at cs.au.dk
Wed Apr 22 18:36:56 EDT 2009
Peter Verswyvelen wrote:
> The GHC documentation of seq says:
> Evaluates its first argument to head normal form, and then returns its
> second argument as the result.
I think this should be "weak head normal form". I don't think you have
any means to evaluate under a binder in Haskell.
The weak in weak head normal forms means that evaluation does not go
"under" lambda binders. The head in weak head normal form means that
evaluation does not take place in argument positions.
Note that most programming languages evaluate to weak normal forms,
because functions are only evaluated when they are called. So the head
part is much more important then the weak part when explaining Haskell
semantics, leading to sometimes omitting the weak part.
Tillmann
More information about the Haskell-Cafe
mailing list