packages feed

list-extras 0.3.0 → 0.4.0

raw patch · 6 files changed

+36/−15 lines, 6 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Data.List.Extras: list :: (a -> [a] -> b) -> b -> [a] -> b
- Data.List.Extras.Pair: zipBy :: ((a, b) -> m (a, b) -> m (a, b)) -> m (a, b) -> [a] -> [b] -> m (a, b)
+ Data.List.Extras.Pair: zipBy :: ((a, b) -> d -> d) -> d -> [a] -> [b] -> d

Files

Data/List/Extras.hs view
@@ -2,20 +2,23 @@ {-# OPTIONS_GHC -Wall -fwarn-tabs #-}  -------------------------------------------------------------------                                                  ~ 2008.07.25+--                                                  ~ 2010.04.05 -- | -- Module      :  Data.List.Extras--- Copyright   :  Copyright (c) 2007--2008 wren ng thornton+-- Copyright   :  Copyright (c) 2007--2010 wren ng thornton -- License     :  BSD3 -- Maintainer  :  wren@community.haskell.org -- Stability   :  stable -- Portability :  portable ----- This module provides a single header for all @Data.List.Extras.*@ modules+-- This module provides a single header for all @Data.List.Extras.*@+-- modules and provides a small number of other utility functions. ----------------------------------------------------------------  module Data.List.Extras-    ( module Data.List.Extras.LazyLength+    (+      list+    , module Data.List.Extras.LazyLength     , module Data.List.Extras.Pair     , module Data.List.Extras.Argmax     ) where@@ -23,5 +26,14 @@ import Data.List.Extras.LazyLength import Data.List.Extras.Pair import Data.List.Extras.Argmax++-- | Pattern matching for lists, as a first-class function. (Could+-- also be considered as a non-recursive 'foldr'.) If the list+-- argument is @[]@ then the default argument is returned; otherwise+-- the function is called with the head and tail of the list.+list :: (a -> [a] -> b) -> b -> [a] -> b+list _ z []     = z+list f _ (x:xs) = f x xs + ---------------------------------------------------------------- ----------------------------------------------------------- fin.
Data/List/Extras/Argmax.hs view
@@ -5,7 +5,7 @@ --                                                  ~ 2008.08.17 -- | -- Module      :  Data.List.Extras.ArgMax--- Copyright   :  Copyright (c) 2007--2008 wren ng thornton+-- Copyright   :  Copyright (c) 2007--2009 wren ng thornton -- License     :  BSD3 -- Maintainer  :  wren@community.haskell.org -- Stability   :  experimental
Data/List/Extras/LazyLength.hs view
@@ -13,7 +13,7 @@ --                                                  ~ 2009.04.02 -- | -- Module      :  Data.List.Extras.LazyLength--- Copyright   :  Copyright (c) 2007--2008 wren ng thornton+-- Copyright   :  Copyright (c) 2007--2009 wren ng thornton -- License     :  BSD3 -- Maintainer  :  wren@community.haskell.org -- Stability   :  stable
Data/List/Extras/Pair.hs view
@@ -2,10 +2,10 @@ {-# OPTIONS_GHC -Wall -fwarn-tabs #-}  -------------------------------------------------------------------                                                  ~ 2009.04.02+--                                                  ~ 2010.05.31 -- | -- Module      :  Data.List.Extras.Pair--- Copyright   :  Copyright (c) 2007--2008 wren ng thornton+-- Copyright   :  Copyright (c) 2007--2009 wren ng thornton -- License     :  BSD3 -- Maintainer  :  wren@community.haskell.org -- Stability   :  stable@@ -51,8 +51,7 @@   -- | A version of 'zip' that uses a user-defined list homomorphism.-zipBy :: ((a,b) -> m (a,b) -> m (a,b)) -> m (a,b)-      -> [a] -> [b] -> m (a,b)+zipBy :: ((a,b) -> d -> d) -> d -> [a] -> [b] -> d zipBy  = zipWithBy (,)  @@ -91,6 +90,8 @@     pairWB (x:xs) (y:ys) cc = pairWB xs ys (cc . f (k x y))     pairWB []     []     cc = Just (cc z)     pairWB _      _      _  = Nothing++-- TODO: we could make this more general still by fusing @f@ and @k@, which we'd often want to do anyways if we're using this full form.  ---------------------------------------------------------------- 
Prelude/Listless.hs view
@@ -5,7 +5,7 @@ --                                                  ~ 2008.07.20 -- | -- Module      :  Prelude.Listless--- Copyright   :  Copyright (c) 2007--2008 wren ng thornton+-- Copyright   :  Copyright (c) 2007--2009 wren ng thornton -- License     :  BSD3 -- Maintainer  :  wren@community.haskell.org -- Stability   :  stable
list-extras.cabal view
@@ -1,13 +1,13 @@ ------------------------------------------------------------------- wren ng thornton <wren@community.haskell.org>    ~ 2009.04.02+-- wren ng thornton <wren@community.haskell.org>    ~ 2010.05.31 ----------------------------------------------------------------  Name:           list-extras-Version:        0.3.0+Version:        0.4.0 Cabal-Version:  >= 1.2 Build-Type:     Simple Stability:      stable-Copyright:      Copyright (c) 2007--2008 wren ng thornton+Copyright:      Copyright (c) 2007--2010 wren ng thornton License:        BSD3 License-File:   LICENSE Author:         wren ng thornton@@ -26,13 +26,21 @@                 maintain a separate package I can share the                 @Data.List.Extras.Foo@ namespace. ++Flag preludeInBase+    Description: base-4.0 deprecated Prelude which is imported qualified+    Default:     False+ Library     Exposed-Modules: Prelude.Listless                    , Data.List.Extras                    , Data.List.Extras.Argmax                    , Data.List.Extras.LazyLength                    , Data.List.Extras.Pair-    Build-Depends:   base+    if flag(preludeInBase)+        Build-Depends: base >= 4+    else+        Build-Depends: base < 3  ---------------------------------------------------------------- ----------------------------------------------------------- fin.