diff --git a/.gitignore b/.gitignore index 85dea93..20df989 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /safe-0.3.tar.gz /safe-0.3.3.tar.gz +/safe-0.3.8.tar.gz diff --git a/ghc-safe.spec b/ghc-safe.spec index 4fafc28..ffbdb88 100644 --- a/ghc-safe.spec +++ b/ghc-safe.spec @@ -3,31 +3,52 @@ %global pkg_name safe Name: ghc-%{pkg_name} -Version: 0.3.3 -Release: 10%{?dist} +Version: 0.3.8 +Release: 1%{?dist} Summary: Library for safe (pattern match free) functions License: BSD -URL: http://hackage.haskell.org/package/%{pkg_name} -Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz +Url: https://hackage.haskell.org/package/%{pkg_name} +Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros %description -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. +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. %package devel Summary: Haskell %{pkg_name} library development files +Provides: %{name}-static = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} Requires(postun): ghc-compiler = %{ghc_version} -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package provides the Haskell %{pkg_name} library development files. @@ -61,6 +82,9 @@ This package provides the Haskell %{pkg_name} library development files. %changelog +* Tue Jan 20 2015 Jens Petersen - 0.3.8-1 +- update to 0.3.8 + * Sat Aug 16 2014 Fedora Release Engineering - 0.3.3-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild diff --git a/sources b/sources index e8fef98..cdd2253 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5df09a74ef9ce6d98c7fd7f97a9eb73e safe-0.3.3.tar.gz +969dffac684eaa98012cf324c3d7bfe4 safe-0.3.8.tar.gz