diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-08-05 22:54:02 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-08-05 22:54:02 +0200 |
commit | 07edcf47c71cc4552a406a4f7b7d9ae1d7fe8a23 (patch) | |
tree | 87334c2395873159058cfec95fbcc227af273f6e /provider/posts | |
parent | fccf1d6ddac8066f9e1698318bc5be0765b678aa (diff) | |
download | dirty-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.lhs | 8 |
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 | |||
69 | complicated structure. We would therefore like to write the following: | 69 | complicated structure. We would therefore like to write the following: |
70 | 70 | ||
71 | ~~~ {.haskell .numberLines} | 71 | ~~~ {.haskell .numberLines} |
72 | updateFoo :: Monad m => Foo -> m Foo | 72 | updateFoo :: Foo -> Monad Foo |
73 | updateFoo = alter $ do | 73 | updateFoo x = alter x $ do |
74 | bar <~ constructNewBarInM | 74 | bar <~ (constructNewBar :: Monad Bar) |
75 | buz .= makeConstantBuz | 75 | buz .= (makeConstantBuz :: Buz) |
76 | ~~~ | 76 | ~~~ |
77 | 77 | ||
78 | The definitions below allow us not only to do so, but also provide some convenience | 78 | The definitions below allow us not only to do so, but also provide some convenience |