packages feed

fmlist 0.1 → 0.1.1

raw patch · 2 files changed

+6/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Data/FMList.hs view
@@ -87,7 +87,9 @@ flatten l   = FM $ \f -> unFM l (foldMap f)  fromList    :: [a] -> FMList a-fromList    = List.foldr cons empty+fromList    = unfoldr listSplit where+  listSplit [] = Nothing+  listSplit (x:xs) = Just (x, xs)  null :: FMList a -> Bool null = foldr (\_ _ -> False) True@@ -112,11 +114,11 @@  take :: (Ord n, Num n) => n -> FMList a -> FMList a take n l = FM $ \f -> -  foldr (\e r i -> if n > 0 then mappend (f e) (r (i-1)) else mempty) (const mempty) l n+  foldr (\e r i -> if i > 0 then mappend (f e) (r (i-1)) else mempty) (const mempty) l n  drop :: (Ord n, Num n) => n -> FMList a -> FMList a drop n l = FM $ \f -> -  foldr (\e r i -> if n <= 0 then mappend (f e) (r i) else r (i-1)) (const mempty) l n+  foldr (\e r i -> if i <= 0 then mappend (f e) (r i) else r (i-1)) (const mempty) l n  takeWhile :: (a -> Bool) -> FMList a -> FMList a takeWhile p l = FM $ \f -> 
fmlist.cabal view
@@ -1,5 +1,5 @@ name:                fmlist-version:             0.1+version:             0.1.1 synopsis:            FoldMap lists description:            FoldMap lists are lists represented by their foldMap function.