packages feed

safe 0.3.2 → 0.3.3

raw patch · 3 files changed

+17/−2 lines, 3 files

Files

Safe.hs view
@@ -42,6 +42,7 @@     maximumDef, maximumMay, maximumNote,     foldr1Def, foldr1May, foldr1Note,     foldl1Def, foldl1May, foldl1Note,+    foldl1Def', foldl1May', foldl1Note',     fromJustDef, fromJustNote,     assertNote,     at, atDef, atMay, atNote,@@ -171,6 +172,16 @@  foldl1Note :: String -> (a -> a -> a) -> [a] -> a foldl1Note note f = liftNote (foldl1 f) null "foldl1 []" note+++foldl1Def'  :: a -> (a -> a -> a) -> [a] -> a+foldl1Def' def f = liftDef (foldl1' f) null def++foldl1May'  :: (a -> a -> a) -> [a] -> Maybe a+foldl1May' f = liftMay (foldl1' f) null++foldl1Note' :: String -> (a -> a -> a) -> [a] -> a+foldl1Note' note f = liftNote (foldl1' f) null "foldl1' []" note   -- | See fromMaybe
Safe/Foldable.hs view
@@ -2,7 +2,11 @@ Equivalent versions to the "Safe" module, but generalised to work over any 'Foldable' type. -}-module Safe.Foldable where+module Safe.Foldable(+    foldl1Note, foldl1Def, foldl1May, foldl1Safe,+    foldr1Note, foldr1Def, foldr1May, foldr1Safe,+    findJust, findJustDef, findJustNote, findJustSafe+    ) where  import Data.Foldable import Data.Monoid
safe.cabal view
@@ -1,7 +1,7 @@ cabal-version:  >= 1.6 build-type:     Simple name:           safe-version:        0.3.2+version:        0.3.3 license:        BSD3 license-file:   LICENSE category:       Unclassified