Commit 377395e5 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Improve documentation for transform list-comps

Thanks to Jeremy Gibbons for spotting the infelictity
parent a7f69097
......@@ -1887,7 +1887,12 @@ guard Control.Monad t1 -> m t2
fmap GHC.Base forall a b. (a->b) -> n a -> n b
mzip Control.Monad.Zip forall a b. m a -> m b -> m (a,b)
</programlisting>
The comprehension should typecheck when its desugaring would typecheck.
The comprehension should typecheck when its desugaring would typecheck,
except that (as discussed in <xref linkend=""/>)
in the "then f" and "then group using f" clauses,
when the "by b" qualifier is omitted, argument f should have a polymorphic type.
In particular, "then Data.List.sort" and
"then group using Data.List.group" are insufficiently polymorphic.
</para>
<para>
Monad comprehensions support rebindable syntax (<xref linkend="rebindable-syntax"/>).
......
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