packages feed

safe 0.3.3 → 0.3.4

raw patch · 4 files changed

+25/−18 lines, 4 files

Files

+ CHANGES.txt view
@@ -0,0 +1,12 @@+Changelog for Safe++0.3.4+    #1, improve the string clipping in readNote+0.3.3+    #494, add foldl1' wrappings+0.3.2+    Add a Safe.Foldable module+0.3.1+    Add findJust, safe wrapping of fromJust/find+0.3+    Start of changelog
LICENSE view
@@ -1,4 +1,4 @@-Copyright Neil Mitchell 2007-2008.+Copyright Neil Mitchell 2007-2014. All rights reserved.  Redistribution and use in source and binary forms, with or without
Safe.hs view
@@ -1,14 +1,5 @@ {- |-Module      :  Safe-Copyright   :  (c) Neil Mitchell 2007-2010-License     :  BSD3--Maintainer  :  http://community.haskell.org/~ndm/safe-Stability   :  in-progress-Portability :  portable- A library for safe functions, based on standard functions that may crash.-For more details see <http://community.haskell.org/~ndm/safe/>  In general, each unsafe function has up to 4 forms. Since 'tail' has all the possible forms, it is fully documented.@@ -29,6 +20,8 @@  * 'lookupJust' - defined as @lookupJust k = fromJust . lookup k@ +* 'findJust' - defined as @findJust f = fromJust . find f@+ * 'abort' - same as @error@, but different intended meaning  -}@@ -236,8 +229,9 @@                      []  -> error $ "Prelude.read: no parse, " ++ msg ++ ", on " ++ prefix                      _   -> error $ "Prelude.read: ambiguous parse, " ++ msg ++ ", on " ++ prefix     where-        prefix = '\"' : a ++ if null b then "\"" else "..."-            where (a,b) = splitAt 10 s+        maxLength = 15+        prefix = '\"' : a ++ if length s <= maxLength then (b ++ "\"") else "...\""+            where (a,b) = splitAt (maxLength - 3) s   -- |
safe.cabal view
@@ -1,15 +1,16 @@ cabal-version:  >= 1.6 build-type:     Simple name:           safe-version:        0.3.3+version:        0.3.4 license:        BSD3 license-file:   LICENSE category:       Unclassified author:         Neil Mitchell <ndmitchell@gmail.com> maintainer:     Neil Mitchell <ndmitchell@gmail.com>-copyright:      Neil Mitchell 2007-2011+copyright:      Neil Mitchell 2007-2014 homepage:       http://community.haskell.org/~ndm/safe/ synopsis:       Library for safe (pattern match free) functions+tested-with:    GHC==7.6.3, GHC==7.4.2, GHC==7.2.2 description:     Partial functions from the base library, such as @head@ and @!!@, modified     to return more descriptive error messages, programmer defined error messages,@@ -17,12 +18,12 @@          These functions can be used to reduce the number of unsafe pattern matches in     your code.-+extra-source-files:+    CHANGES.txt  source-repository head-    type:     darcs-    location: http://community.haskell.org/~ndm/darcs/safe/-+    type:     git+    location: https://github.com/ndmitchell/safe.git  library     build-depends: