Clarify seq documentation

Authored by psibi on Sep 11 2017, 10:10 AM.



Improves the documentation by specifying that the first argument in
seq function is evaluated to WHNF.

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
psibi created this revision.Sep 11 2017, 10:10 AM
psibi updated this revision to Diff 13820.Sep 11 2017, 10:23 AM
  • Add further clarification
harendra added inline comments.

I would rephrase it like this:

The value of {\tt seq a b} is bottom if {\tt a} is bottom, and otherwise equal to {\tt b}. In other words, it evaluates the first argument {\tt a} to weak head normal form (WHNF). {\tt seq} is usually introduced to improve performance by avoiding unneeded laziness.

bgamari accepted this revision.Sep 13 2017, 11:32 AM


This revision is now accepted and ready to land.Sep 13 2017, 11:32 AM
bgamari retitled this revision from seq documentation: fix trac issue #14213 to Clarify seq documentation.Sep 13 2017, 11:33 AM
bgamari updated the Trac tickets for this revision.
This revision was automatically updated to reflect the committed changes.