diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 710efbb1ece5..b3985978be2d 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -922,14 +922,14 @@ As you can guess justOnes will evaluate to Just [-1, to the underlying monadic value-recursion operator mfix, belonging to the MonadFix class. Here is an example: -rec { b <- f a c ===> (b,c) <- mfix (\~(b,c) -> do { b <- f a c - ; c <- f b a } ; c <- f b a - ; return (b,c) }) +rec { b <- f a c ===> (b,c) <- mfix (\ ~(b,c) -> do { b <- f a c + ; c <- f b a } ; c <- f b a + ; return (b,c) }) As usual, the meta-variables b, c etc., can be arbitrary patterns. In general, the statement rec ss is desugared to the statement -vs <- mfix (\~vs -> do { ss; return vs }) +vs <- mfix (\ ~vs -> do { ss; return vs }) where vs is a tuple of the variables bound by ss.