Path to this page:
./
devel/hs-safe,
Library for safe (pattern match free) functions
Branch: CURRENT,
Version: 0.3.21nb1,
Package name: hs-safe-0.3.21nb1,
Maintainer: szptvlfnA 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:[
lang/ghc88]
Required to build:[
pkgtools/cwrappers]
Master sites:
Filesize: 11.502 KB
Version history: (Expand)
- (2024-05-09) Updated to version: hs-safe-0.3.21nb1
- (2024-04-29) Updated to version: hs-safe-0.3.21
- (2023-11-02) Updated to version: hs-safe-0.3.19nb7
- (2023-10-09) Updated to version: hs-safe-0.3.19nb6
- (2023-02-09) Updated to version: hs-safe-0.3.19nb5
- (2022-02-26) Updated to version: hs-safe-0.3.19nb4
CVS history: (Expand)