sorted-list 0.1.2.1 → 0.1.3.0
raw patch · 2 files changed
+11/−4 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Data.SortedList: instance Eq a => Eq (SortedList a)
+ Data.SortedList: instance Ord a => Ord (SortedList a)
+ Data.SortedList: null :: SortedList a -> Bool
Files
- Data/SortedList.hs +10/−3
- sorted-list.cabal +1/−1
Data/SortedList.hs view
@@ -26,6 +26,9 @@ , splitAt , filter -- * Queries+#if !MIN_VERSION_base(4,8,0)+ , null+#endif , elemOrd -- * Others , map@@ -41,18 +44,18 @@ #endif ) import qualified Data.List as List+#if MIN_VERSION_base(4,5,0) import Data.Monoid ((<>))+#endif import Data.Foldable (Foldable (..))--- GHC 7.8.3 compatibility #if !MIN_VERSION_base(4,8,0) import Data.Monoid (Monoid (..))-import Data.Foldable (Foldable, foldr) #endif -- -- | Type of sorted lists. Any (non-bottom) value of this type -- is a sorted list.-newtype SortedList a = SortedList [a]+newtype SortedList a = SortedList [a] deriving (Eq, Ord) instance Show a => Show (SortedList a) where show = show . fromSortedList@@ -122,7 +125,11 @@ -- | /O(n)/. Insert a new element in a sorted list. insert :: Ord a => a -> SortedList a -> SortedList a+#if MIN_VERSION_base(4,5,0) insert x xs = singleton x <> xs+#else+insert x xs = mappend (singleton x) xs+#endif -- | Extract the prefix with the given length from a sorted list. take :: Int -> SortedList a -> SortedList a
sorted-list.cabal view
@@ -1,5 +1,5 @@ name: sorted-list-version: 0.1.2.1+version: 0.1.3.0 synopsis: Type-enforced sorted lists and related functions. description: Type-enforced sorted lists and related functions. .