summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-07-27 06:22:26 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-07-27 06:22:26 +0100
commite2ba86228445cfe5faeedccb73a3ddea0a3b9026 (patch)
tree2bcb35b0a33d57b862f5dd4ed71b01a514c0164a /docs
parent921b1b3286d95fccb03ec6c31e8abd02fde1bab9 (diff)
downloadhaskell-e2ba86228445cfe5faeedccb73a3ddea0a3b9026.tar.gz
Fix comments and documentation on monad comprehensions
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/glasgow_exts.xml6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 77d37c8f7a..8aca42c2ea 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -1382,13 +1382,15 @@ D[ e | (Q | R), S ] = mzip D[ Qv | Q ] D[ Rv | R ] &gt;&gt;= \(Qv,Rv) -&gt; D
-- Transform comprehensions
D[ e | Q then f, R ] = f D[ Qv | Q ] &gt;&gt;= \Qv -&gt; D[ e | R ]
-D[ e | Q then f by b, R ] = f b D[ Qv | Q ] &gt;&gt;= \Qv -&gt; D[ e | R ]
+D[ e | Q then f by b, R ] = f (\Qv -&gt; b) D[ Qv | Q ] &gt;&gt;= \Qv -&gt; D[ e | R ]
D[ e | Q then group using f, R ] = f D[ Qv | Q ] &gt;&gt;= \ys -&gt;
case (fmap selQv1 ys, ..., fmap selQvn ys) of
Qv -&gt; D[ e | R ]
-D[ e | Q then group by b using f, R ] = f b D[ Qv | Q ] &gt;&gt;= \ys -&gt;
+D[ e | Q then group by b, R ] = D[ e | Q then group by b using mgroupWith, R ]
+
+D[ e | Q then group by b using f, R ] = f (\Qv -&gt; b) D[ Qv | Q ] &gt;&gt;= \ys -&gt;
case (fmap selQv1 ys, ..., fmap selQvn ys) of
Qv -&gt; D[ e | R ]