Top 0.5% downloads on hackage.haskell.org
Top 0.3% dependent packages on hackage.haskell.org
Top 0.3% dependent repos on hackage.haskell.org
Top 1.3% docker downloads on hackage.haskell.org
hackage.haskell.org : safe
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.
Registry
-
Source
- Homepage
- JSON
- codemeta.json
purl: pkg:hackage/safe
Keywords:
bsd3
, library
, unclassified
, Propose Tags
License: BSD-3-Clause
Latest release: about 2 years ago
First release: over 17 years ago
Dependent packages: 111
Dependent repositories: 1,812
Downloads: 214,548 total
Stars: 45 on GitHub
Forks: 11 on GitHub
Docker dependents: 2
Docker downloads: 89
Total Commits: 204
Committers: 14
Average commits per author: 14.571
Development Distribution Score (DDS): 0.103
More commit stats: commits.ecosyste.ms
See more repository details: repos.ecosyste.ms
Last synced: 30 days ago