NOTICE: This package has been removed from pkgsrc

./wip/hs-safe, Library for safe (pattern match free) functions

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ]


Branch: CURRENT, Version: 0.3.7, Package name: hs-safe-0.3.7, Maintainer: szptvlfn

A library wrapping Prelude/Data.List functions that can throw exceptions, such
as head and !!. Each unsafe function has up to four variants, e.g. with tail:

* tail :: [a] -> [a], raises an error on tail [].

* tailMay :: [a] -> Maybe [a], turns errors into Nothing.

* tailDef :: [a] -> [a] -> [a], takes a default to return on errors.

* tailNote :: String -> [a] -> [a], takes an extra argument which supplements
the error message.

* tailSafe :: [a] -> [a], returns some sensible default if possible,
[] in the case of tail.

This package is divided into three modules:

* Safe contains safe variants of Prelude and Data.List functions.

* Safe.Foldable contains safe variants of Foldable functions.

* Safe.Exact creates crashing versions of functions like zip (errors if
the lists are not equal) and take (errors if there are not enough elements),
then wraps them to provide safe variants.


Required to run:
[wip/ghc]

Master sites:

SHA1: 39074b3850acd6be94bdbdca0089c048c53433dd
RMD160: 8fa67c849f0d693628c64c26c1f3859df14fbe68
Filesize: 6.146 KB

Version history: (Expand)


CVS history: (Expand)


   2014-08-02 23:44:59 by Ryosuke Moro | Files touched by this commit (33) | Package removed
Log message:
Remove hs-distributive, imported to pkgsrc/math.
Remove hs-regex-posix, imported to pkgsrc/textproc.
Remove hs-safe, imported to pkgsrc/devel.
   2014-07-26 23:49:27 by Ryosuke Moro | Files touched by this commit (4)
Log message:
Update to 0.3.7

CHANGES:
0.3.7
    Add Def variants of the Exact functions
   2014-07-12 23:43:41 by Ryosuke Moro | Files touched by this commit (4)
Log message:
Update to 0.3.6

CHANGES:
0.3.6
    #6, remove unnecessary Ord constraints from maximumBy/minimumBy
0.3.5
    Add Safe elemIndexJust/findIndexJust functions
    Add Safe scan functions
    Add Safe minimumBy/maximumBy functions
    Add a module of Exact functions
    Add Foldable minimum functions
    Clean up the Foldable module, deprecate the Safe variants
   2014-05-05 02:03:01 by Ryosuke Moro | Files touched by this commit (74)
Log message:
Update MAINTAINER address
   2014-04-21 11:11:37 by Ryosuke Moro | Files touched by this commit (38)
Log message:
- ready for HASKELL_ENABLE_HADDOCK_DOCUMENTATION= yes
   2014-02-01 11:10:33 by Ryosuke Moro | Files touched by this commit (3)
Log message:
Update to 0.3.4

CHANGES:
0.3.4
    #1, improve the string clipping in readNote
( #1 => https://github.com/ndmitchell/safe/issues/1 )
   2013-11-25 12:20:27 by Ryosuke Moro | Files touched by this commit (5)
Log message:
Import safe-0.3.3 as wip/hs-safe.

Partial functions from the base library, such as head and !!, modified to
return more descriptive error messages, programmer defined error messages,
Maybe wrapped results and default values. These functions can be used to
reduce the number of unsafe pattern matches in your code.