lub 0.0.5 → 0.0.6
raw patch · 2 files changed
+18/−5 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- lub.cabal +3/−3
- src/Data/Lub.hs +15/−2
lub.cabal view
@@ -1,5 +1,5 @@ Name: lub-Version: 0.0.5+Version: 0.0.6 Cabal-Version: >= 1.2 Synopsis: least upper bounds -- information merging Category: Concurrency, Data, Other@@ -17,7 +17,7 @@ Author: Conal Elliott Maintainer: conal@conal.net Homepage: http://haskell.org/haskellwiki/lub-Package-Url: http://code.haskell.org/lub+Package-Url: http://code.haskell.org/~conal/code/lub Copyright: (c) 2008 by Conal Elliott License: BSD3 Stability: experimental@@ -26,7 +26,7 @@ Library hs-Source-Dirs: src Extensions:- Build-Depends: base, unamb >= 0.1.3+ Build-Depends: base < 5, unamb >= 0.1.3 Exposed-Modules: Data.Repr Data.Lub
src/Data/Lub.hs view
@@ -27,7 +27,7 @@ import Control.Applicative (liftA2) import Data.Unamb hiding (parCommute)-import qualified Data.Unamb as Unamb+-- import qualified Data.Unamb as Unamb import Data.Repr @@ -143,7 +143,7 @@ -- parallel, 'lub'-merging the results. Useful when there are special -- cases that don't require evaluating both arguments. -- --- Similar to 'Unamb.parCommute', but uses 'lub' instead of 'unamb'.+-- Similar to parCommute from Unamb, but uses 'lub' instead of 'unamb'. parCommute :: HasLub b => (a -> a -> b) -> (a -> a -> b) parCommute op x y = (x `op` y) `lub` (y `op` x) @@ -173,5 +173,18 @@ 0 * undefined :: Integer 0 `ptimes` undefined :: Integer undefined `ptimes` 0 :: Integer++zip' :: (HasLub a, HasLub b) => [a] -> [b] -> [(a,b)]+zip' = lubs [p1,p2,p3]+ where+ p1 [] _ = []+ p2 _ [] = []+ p3 (x:xs) (y:ys) = (x,y) : zip' xs ys++zip' [] (error "boom") :: [(Int,Int)]+zip' (error "boom") [] :: [(Int,Int)]++zip' [10,20] (1 : 2 : error "boom")+zip' (1 : 2 : error "boom") [10,20] -}