packages feed

heaps 0.3.2.1 → 0.3.3

raw patch · 4 files changed

+18/−8 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Heap: instance (Data p, Data a) => Data (Entry p a)
- Data.Heap: instance (Ord a, Data a) => Data (Heap a)
- Data.Heap: instance (Ord a, Read a) => Read (Heap a)
- Data.Heap: instance (Read p, Read a) => Read (Entry p a)
- Data.Heap: instance (Show p, Show a) => Show (Entry p a)
- Data.Heap: instance Eq (Heap a)
- Data.Heap: instance Eq p => Eq (Entry p a)
- Data.Heap: instance Foldable (Entry p)
- Data.Heap: instance Foldable Forest
- Data.Heap: instance Foldable Heap
- Data.Heap: instance Foldable Tree
- Data.Heap: instance Functor (Entry p)
- Data.Heap: instance Functor Forest
- Data.Heap: instance Functor Tree
- Data.Heap: instance Monoid (Heap a)
- Data.Heap: instance Ord (Heap a)
- Data.Heap: instance Ord p => Ord (Entry p a)
- Data.Heap: instance Read a => Read (Forest a)
- Data.Heap: instance Read a => Read (Tree a)
- Data.Heap: instance Show a => Show (Forest a)
- Data.Heap: instance Show a => Show (Heap a)
- Data.Heap: instance Show a => Show (Tree a)
- Data.Heap: instance Traversable (Entry p)
- Data.Heap: instance Typeable Entry
- Data.Heap: instance Typeable Forest
- Data.Heap: instance Typeable Heap
- Data.Heap: instance Typeable Tree
- Data.Heap: payload :: Entry p a -> a
- Data.Heap: priority :: Entry p a -> p
+ Data.Heap: [payload] :: Entry p a -> a
+ Data.Heap: [priority] :: Entry p a -> p
+ Data.Heap: instance (Data.Data.Data p, Data.Data.Data a) => Data.Data.Data (Data.Heap.Entry p a)
+ Data.Heap: instance (GHC.Classes.Ord a, Data.Data.Data a) => Data.Data.Data (Data.Heap.Heap a)
+ Data.Heap: instance (GHC.Classes.Ord a, GHC.Read.Read a) => GHC.Read.Read (Data.Heap.Heap a)
+ Data.Heap: instance (GHC.Read.Read p, GHC.Read.Read a) => GHC.Read.Read (Data.Heap.Entry p a)
+ Data.Heap: instance (GHC.Show.Show p, GHC.Show.Show a) => GHC.Show.Show (Data.Heap.Entry p a)
+ Data.Heap: instance Data.Foldable.Foldable (Data.Heap.Entry p)
+ Data.Heap: instance Data.Foldable.Foldable Data.Heap.Forest
+ Data.Heap: instance Data.Foldable.Foldable Data.Heap.Heap
+ Data.Heap: instance Data.Foldable.Foldable Data.Heap.Tree
+ Data.Heap: instance Data.Traversable.Traversable (Data.Heap.Entry p)
+ Data.Heap: instance GHC.Base.Functor (Data.Heap.Entry p)
+ Data.Heap: instance GHC.Base.Functor Data.Heap.Forest
+ Data.Heap: instance GHC.Base.Functor Data.Heap.Tree
+ Data.Heap: instance GHC.Base.Monoid (Data.Heap.Heap a)
+ Data.Heap: instance GHC.Classes.Eq (Data.Heap.Heap a)
+ Data.Heap: instance GHC.Classes.Eq p => GHC.Classes.Eq (Data.Heap.Entry p a)
+ Data.Heap: instance GHC.Classes.Ord (Data.Heap.Heap a)
+ Data.Heap: instance GHC.Classes.Ord p => GHC.Classes.Ord (Data.Heap.Entry p a)
+ Data.Heap: instance GHC.Read.Read a => GHC.Read.Read (Data.Heap.Forest a)
+ Data.Heap: instance GHC.Read.Read a => GHC.Read.Read (Data.Heap.Tree a)
+ Data.Heap: instance GHC.Show.Show a => GHC.Show.Show (Data.Heap.Forest a)
+ Data.Heap: instance GHC.Show.Show a => GHC.Show.Show (Data.Heap.Heap a)
+ Data.Heap: instance GHC.Show.Show a => GHC.Show.Show (Data.Heap.Tree a)
- Data.Heap: concatMap :: Ord b => (a -> Heap b) -> Heap a -> Heap b
+ Data.Heap: concatMap :: (a -> Heap b) -> Heap a -> Heap b
- Data.Heap: null :: Heap a -> Bool
+ Data.Heap: null :: Foldable t => forall a. t a -> Bool
- Data.Heap: uncons :: Ord a => Heap a -> Maybe (a, Heap a)
+ Data.Heap: uncons :: Heap a -> Maybe (a, Heap a)
- Data.Heap: viewMin :: Ord a => Heap a -> Maybe (a, Heap a)
+ Data.Heap: viewMin :: Heap a -> Maybe (a, Heap a)

Files

CHANGELOG.markdown view
@@ -1,3 +1,8 @@+0.3.3+-----+* Remove redundant constraints+* Build warning-free on GHC 8.0-rc1+ 0.3.2.1 ------- * Haddock fix
README.markdown view
@@ -1,7 +1,7 @@ heaps ====== -[![Build Status](https://secure.travis-ci.org/ekmett/heaps.png?branch=master)](http://travis-ci.org/ekmett/heaps)+[![Hackage](https://img.shields.io/hackage/v/heaps.svg)](https://hackage.haskell.org/package/heaps) [![Build Status](https://secure.travis-ci.org/ekmett/heaps.png?branch=master)](http://travis-ci.org/ekmett/heaps)  This package provides Brodal/Okasaki heaps. These are asymptotically optimal purely functional heaps. 
heaps.cabal view
@@ -1,5 +1,5 @@ name:           heaps-version:        0.3.2.1+version:        0.3.3 license:        BSD3 license-file:   LICENSE author:         Edward A. Kmett@@ -37,6 +37,4 @@     doctest >= 0.9 && <= 0.10,     filepath   ghc-options: -Wall-  if impl(ghc<7.6.1)-    ghc-options: -Werror   hs-source-dirs: tests
src/Data/Heap.hs view
@@ -254,13 +254,13 @@ -- -- >>> uncons (fromList [2,1,3]) -- Just (1,fromList [2,3])-uncons :: Ord a => Heap a -> Maybe (a, Heap a)+uncons :: Heap a -> Maybe (a, Heap a) uncons Empty = Nothing uncons l@(Heap _ _ t) = Just (root t, deleteMin l) {-# INLINE uncons #-}  -- | Same as 'uncons'-viewMin :: Ord a => Heap a -> Maybe (a, Heap a)+viewMin :: Heap a -> Maybe (a, Heap a) viewMin = uncons {-# INLINE viewMin #-} @@ -571,7 +571,7 @@ -- -- >>> concatMap (\a -> fromList [a,a+1]) (fromList [1,4]) -- fromList [1,4,5,2]-concatMap :: Ord b => (a -> Heap b) -> Heap a -> Heap b+concatMap :: (a -> Heap b) -> Heap a -> Heap b concatMap _ Empty = Empty concatMap f h@(Heap _ _ t) = foldMap f t {-# INLINE concatMap #-}@@ -745,7 +745,14 @@ splitWithList f hp@(Heap _ leq _) = both (fromListWith leq) (f (toList hp)) {-# INLINE splitWithList #-} --- | explicit priority/payload tuples+-- | Explicit priority/payload tuples. Useful to build a priority queue using+-- a 'Heap', since the payload is ignored in the Eq/Ord instances.+--+-- @+-- myHeap = 'fromList' ['Entry' 2 \"World", 'Entry' 1 \"Hello", 'Entry' 3 "!"]+--+-- ==> 'foldMap' 'payload' myHeap ≡ "HelloWorld!"+-- @ data Entry p a = Entry { priority :: p, payload :: a }   deriving (Read,Show,Data,Typeable)