diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-08-12 14:50:59 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-08-12 14:50:59 +0200 |
commit | 434c18eb5944bb4a2340623a3cfc0bf9ca9faad1 (patch) | |
tree | 8b0edf21b7c20d83e749d5a70c236ee0114b6fe2 /provider/posts | |
parent | 0a8a750925e33b4bb68fe7bd508f8e3d94e758a9 (diff) | |
download | dirty-haskell.org-434c18eb5944bb4a2340623a3cfc0bf9ca9faad1.tar dirty-haskell.org-434c18eb5944bb4a2340623a3cfc0bf9ca9faad1.tar.gz dirty-haskell.org-434c18eb5944bb4a2340623a3cfc0bf9ca9faad1.tar.bz2 dirty-haskell.org-434c18eb5944bb4a2340623a3cfc0bf9ca9faad1.tar.xz dirty-haskell.org-434c18eb5944bb4a2340623a3cfc0bf9ca9faad1.zip |
removed obsolete replace
Diffstat (limited to 'provider/posts')
-rw-r--r-- | provider/posts/beuteltier-4.lhs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/provider/posts/beuteltier-4.lhs b/provider/posts/beuteltier-4.lhs index 11cb8bc..478cbac 100644 --- a/provider/posts/beuteltier-4.lhs +++ b/provider/posts/beuteltier-4.lhs | |||
@@ -5,7 +5,7 @@ tags: Beuteltier | |||
5 | --- | 5 | --- |
6 | 6 | ||
7 | It turns out I don´t have to write much in the way of comments—the source file is already | 7 | It turns out I don´t have to write much in the way of comments—the source file is already |
8 | quite well commented. | 8 | quite well documented. |
9 | 9 | ||
10 | > {-# LANGUAGE KindSignatures #-} | 10 | > {-# LANGUAGE KindSignatures #-} |
11 | > | 11 | > |
@@ -197,16 +197,9 @@ Quite often we want to undue the harm done by `forceAllThunks` (to save space, u | |||
197 | > toNum ExitSuccess = 0 | 197 | > toNum ExitSuccess = 0 |
198 | > toNum (ExitFailure i) = fromInteger $ toInteger i | 198 | > toNum (ExitFailure i) = fromInteger $ toInteger i |
199 | 199 | ||
200 | We provide quite a few convenience functions for high-level interactions. | 200 | We provide `update`, a convenience function for high-level interactions (though costly on |
201 | large sets of equivalent objects (which should not exist due to nubbing)). | ||
201 | 202 | ||
202 | > replace :: Beutel f => Object -> f () | ||
203 | > -- ^ @replace o@ replaces /all/ 'Object's 'Equivalent' to @o@ within the 'Beutel' with @o@. | ||
204 | > -- | ||
205 | > -- Does not handle '_sUpdates'. | ||
206 | > -- | ||
207 | > -- Uses 'eqTo' and is thus costly. | ||
208 | > replace o = delete (eqTo o) >> insert o | ||
209 | > | ||
210 | > eqTo :: Monad f => Object -> SearchQuery f | 203 | > eqTo :: Monad f => Object -> SearchQuery f |
211 | > -- ^ @eqTo o@ constructs a 'SearchQuery' that matches all 'Object's 'Equivalent' to @o@ | 204 | > -- ^ @eqTo o@ constructs a 'SearchQuery' that matches all 'Object's 'Equivalent' to @o@ |
212 | > -- | 205 | > -- |