lub 0.0.4 → 0.0.5
raw patch · 3 files changed
+11/−7 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Data.Lub: pand :: Bool -> Bool -> Bool
- Data.Lub: por :: Bool -> Bool -> Bool
+ Data.Lub: lubs :: (HasLub a) => [a] -> a
Files
- lub.cabal +1/−1
- src/Data/Lub.hs +5/−2
- wikipage.tw +5/−4
lub.cabal view
@@ -1,5 +1,5 @@ Name: lub-Version: 0.0.4+Version: 0.0.5 Cabal-Version: >= 1.2 Synopsis: least upper bounds -- information merging Category: Concurrency, Data, Other
src/Data/Lub.hs view
@@ -21,7 +21,7 @@ -- * Least upper bounds HasLub(..), flatLub -- * Some useful special applications of 'lub'- , parCommute, pand, por, ptimes+ , parCommute, ptimes ) where import Control.Applicative (liftA2)@@ -36,7 +36,10 @@ -- | Least upper information bound. Combines information available from -- each argument. The arguments must be consistent, i.e., must have a -- common upper bound.- lub :: a -> a -> a+ lub :: a -> a -> a+ -- | n-ary 'lub'. Defaults to @foldr lub undefined@+ lubs :: [a] -> a+ lubs = foldr lub undefined -- The following instance is wrong, since it lubs two undefineds to (). --
wikipage.tw view
@@ -1,17 +1,18 @@ [[Category:Packages]]+[[Category:Concurrency]] == Abstract == Lub is an experiment in computing least upper information bounds on (partially defined) functional values.-It provides a <hask>lub</hask> function that is consistent with the <hask>unamb</hask> operator but has a more liberal precondition.-Where <hask>unamb</hask> requires its arguments to equal when neither is bottom, <hask>lub</hask> is able to synthesize a value from the partial information contained in both of its arguments.+It provides a <hask>lub</hask> function that is consistent with the [[unamb]] operator but has a more liberal precondition.+Where <hask>unamb</hask> requires its arguments to equal when neither is bottom, <hask>lub</hask> is able to synthesize a value from the partial information contained in both of its arguments, which is useful with non-flat types. Besides this wiki page, here are more ways to find out about lub:+* Read the blog post ''[http://conal.net/blog/posts/merging-partial-values/ Merging partial values]'' * Visit the [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/lub Hackage page] for library documentation and to download & install. * Or install with <tt>cabal install lub</tt>. * Get the code repository: <tt>darcs get http://code.haskell.org/lub</tt>. <!-- * See the [[lub/Versions| version history]]. -->--Please leave comments at the [[Talk:lub|Talk page]].+<!-- Please leave comments at the [[Talk:lub|Talk page]]. --> I got inspired for this package after [http://tunes.org/~nef/logs/haskell/08.11.17 stimulating discussions] with Thomas Davie, Russell O'Connor others in the #haskell gang.