Commit 4e222203 authored by Sibi Prabakaran's avatar Sibi Prabakaran Committed by Ben Gamari
Browse files

Clarify seq documentation

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

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: harendra, rwbarton, thomie

GHC Trac Issues: #14213

Differential Revision: https://phabricator.haskell.org/D3945
parent 4be195e7
......@@ -2817,8 +2817,9 @@ pseudoop "proxy#"
pseudoop "seq"
a -> b -> b
{ The value of {\tt seq a b} is bottom if {\tt a} is bottom, and
otherwise equal to {\tt b}. {\tt seq} is usually introduced to
improve performance by avoiding unneeded laziness.
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.
A note on evaluation order: the expression {\tt seq a b} does
{\it not} guarantee that {\tt a} will be evaluated before {\tt b}.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment