summaryrefslogtreecommitdiff
path: root/provider/posts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-08-05 22:54:02 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-08-05 22:54:02 +0200
commit07edcf47c71cc4552a406a4f7b7d9ae1d7fe8a23 (patch)
tree87334c2395873159058cfec95fbcc227af273f6e /provider/posts
parentfccf1d6ddac8066f9e1698318bc5be0765b678aa (diff)
downloaddirty-haskell.org-07edcf47c71cc4552a406a4f7b7d9ae1d7fe8a23.tar
dirty-haskell.org-07edcf47c71cc4552a406a4f7b7d9ae1d7fe8a23.tar.gz
dirty-haskell.org-07edcf47c71cc4552a406a4f7b7d9ae1d7fe8a23.tar.bz2
dirty-haskell.org-07edcf47c71cc4552a406a4f7b7d9ae1d7fe8a23.tar.xz
dirty-haskell.org-07edcf47c71cc4552a406a4f7b7d9ae1d7fe8a23.zip
fixed code example
Diffstat (limited to 'provider/posts')
-rw-r--r--provider/posts/beuteltier-2.lhs8
1 files changed, 4 insertions, 4 deletions
diff --git a/provider/posts/beuteltier-2.lhs b/provider/posts/beuteltier-2.lhs
index 4ffd75f..d5e0294 100644
--- a/provider/posts/beuteltier-2.lhs
+++ b/provider/posts/beuteltier-2.lhs
@@ -69,10 +69,10 @@ Quite often we find ourselves in the position that we want to alter some small p
69complicated structure. We would therefore like to write the following: 69complicated structure. We would therefore like to write the following:
70 70
71~~~ {.haskell .numberLines} 71~~~ {.haskell .numberLines}
72updateFoo :: Monad m => Foo -> m Foo 72updateFoo :: Foo -> Monad Foo
73updateFoo = alter $ do 73updateFoo x = alter x $ do
74 bar <~ constructNewBarInM 74 bar <~ (constructNewBar :: Monad Bar)
75 buz .= makeConstantBuz 75 buz .= (makeConstantBuz :: Buz)
76~~~ 76~~~
77 77
78The definitions below allow us not only to do so, but also provide some convenience 78The definitions below allow us not only to do so, but also provide some convenience