packages feed

sorted-list 0.2.2.0 → 0.2.3.0

raw patch · 5 files changed

+45/−39 lines, 5 files

Files

Data/SortedList.hs view
@@ -46,6 +46,8 @@     -- * @map@ function   , map   , mapDec+    -- * @traverse@ function+  , traverse     -- * Unfolding   , unfoldr     -- * Others@@ -61,7 +63,7 @@ import Prelude hiding   ( take, drop, splitAt, filter   , repeat, replicate, iterate-  , null, map, reverse+  , null, map, reverse, traverse   , span, takeWhile, dropWhile #if !MIN_VERSION_base(4,8,0)   , foldr, foldl@@ -69,7 +71,7 @@     ) import qualified Data.List as List import Control.DeepSeq (NFData (..))-import Data.Foldable (Foldable (..))+import Data.Foldable (Foldable (..), foldrM) -- #if MIN_VERSION_base(4,5,0) && !MIN_VERSION_base(4,9,0) import Data.Monoid ((<>))@@ -363,6 +365,14 @@ "SortedList:map/mapDec" forall f g xs. map f (mapDec g xs) = map (f . g) xs "SortedList:mapDec/id"  forall xs.     mapDec id xs = xs   #-}++-- | Traverse a sorted list with a function that returns in a monad.+--   The same performance observations apply here than in 'map', as+--   changing the values may involve reordering the list.+--+--   @since 0.2.3.0+traverse :: (Monad m, Ord b) => (a -> m b) -> SortedList a -> m (SortedList b)+traverse f = foldrM (\x xs -> liftA2 insert (f x) $ pure xs) mempty  #if MIN_VERSION_base(4,6,0) 
− LICENSE
@@ -1,30 +0,0 @@-Copyright (c) 2023, Daniel Casanueva--All rights reserved.--Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions are met:--    * Redistributions of source code must retain the above copyright-      notice, this list of conditions and the following disclaimer.--    * Redistributions in binary form must reproduce the above-      copyright notice, this list of conditions and the following-      disclaimer in the documentation and/or other materials provided-      with the distribution.--    * Neither the name of Daniel Casanueva nor the names of other-      contributors may be used to endorse or promote products derived-      from this software without specific prior written permission.--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
changelog.md view
@@ -1,3 +1,8 @@+## 0.2.3.0+* Update metadata.+* Add `traverse`.+* License changed from BSD3 to MIT for consistency.+ ## 0.2.2.0 * Add `deleteAll`. 
+ license view
@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2025 Daniel Díaz Casanueva++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.
sorted-list.cabal view
@@ -1,5 +1,5 @@ name:                sorted-list-version:             0.2.2.0+version:             0.2.3.0 synopsis:            Type-enforced sorted lists and related functions. description:         Type-enforced sorted lists and related functions.                      .@@ -24,11 +24,11 @@                      .                      If you are missing a feature, do not hesitate                      to ask by opening an issue at the bug-tracker.-license:             BSD3-license-file:        LICENSE-author:              Daniel Casanueva (daniel.casanueva `at` proton.me)-maintainer:          Daniel Casanueva (daniel.casanueva `at` proton.me)-bug-reports:         https://gitlab.com/daniel-casanueva/haskell/sorted-list/-/issues+license:             MIT+license-file:        license+author:              Daniel Casanueva (coding `at` danielcasanueva.eu)+maintainer:          Daniel Casanueva (coding `at` danielcasanueva.eu)+bug-reports:         https://codeberg.org/daniel-casanueva/sorted-list/issues category:            Data build-type:          Simple cabal-version:       1.18@@ -46,7 +46,7 @@   type: exitcode-stdio-1.0   hs-source-dirs: bench   main-is: map.hs-  ghc-options: -O2 -Wall+  ghc-options: -Wall   build-depends: base == 4.*                , sorted-list                , criterion