From 12727dbf2904a0fce6986a8876245d5d3535b71f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 29 Jan 2021 10:52:44 +0800 Subject: [PATCH] update to 0.4.0.1 --- .gitignore | 1 + ghc-strict.spec | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- sources | 2 +- 3 files changed, 48 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d12c0aa..635ce0e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /strict-0.3.2.tar.gz +/strict-0.4.0.1.tar.gz diff --git a/ghc-strict.spec b/ghc-strict.spec index e5dc714..7abfa21 100644 --- a/ghc-strict.spec +++ b/ghc-strict.spec @@ -5,8 +5,8 @@ %global pkgver %{pkg_name}-%{version} Name: ghc-%{pkg_name} -Version: 0.3.2 -Release: 31%{?dist} +Version: 0.4.0.1 +Release: 1%{?dist} Summary: Strict data types and String IO License: BSD @@ -18,14 +18,53 @@ Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros -BuildRequires: ghc-array-prof +BuildRequires: ghc-assoc-prof BuildRequires: ghc-base-prof +BuildRequires: ghc-binary-prof +BuildRequires: ghc-bytestring-prof +BuildRequires: ghc-deepseq-prof +BuildRequires: ghc-hashable-prof +BuildRequires: ghc-text-prof +BuildRequires: ghc-these-prof +BuildRequires: ghc-transformers-prof # End cabal-rpm deps %description This package provides strict versions of some standard Haskell data types (pairs, Maybe and Either). It also contains strict IO operations. +It is common knowledge that lazy datastructures can lead to space-leaks. +This problem is particularly prominent, when using lazy datastructures to store +the state of a long-running application in memory. One common solution to this +problem is to use 'seq' and its variants in every piece of code that updates +your state. However a much easier solution is to use fully strict types to +store such state values. By "fully strict types" we mean types for whose values +it holds that, if they are in weak-head normal form, then they are also in +normal form. Intuitively, this means that values of fully strict types cannot +contain unevaluated thunks. + +To define a fully strict datatype, one typically uses the following recipe. + +1. Make all fields of every constructor strict; i.e., add a bang to all fields. + +2. Use only strict types for the fields of the constructors. + +The second requirement is problematic as it rules out the use of the standard +Haskell 'Maybe', 'Either', and pair types. This library solves this problem by +providing strict variants of these types and their corresponding standard +support functions and type-class instances. + +Note that this library does currently not provide fully strict lists. +They can be added if they are really required. However, in many cases one +probably wants to use unboxed or strict boxed vectors from the 'vector' library +() instead of strict lists. +Moreover, instead of 'String's one probably wants to use strict 'Text' values +from the 'text' library (). + +This library comes with batteries included; i.e., mirror functions and +instances of the lazy versions in 'base'. It also includes instances for +type-classes from the 'deepseq', 'binary', and 'hashable' packages. + %package devel Summary: Haskell %{pkg_name} library development files @@ -86,6 +125,7 @@ This package provides the Haskell %{pkg_name} profiling library. %files devel -f %{name}-devel.files +%doc CHANGELOG.md %if %{with haddock} @@ -100,6 +140,9 @@ This package provides the Haskell %{pkg_name} profiling library. %changelog +* Thu Aug 5 2021 Jens Petersen - 0.4.0.1-1 +- update to 0.4.0.1 + * Thu Jul 22 2021 Fedora Release Engineering - 0.3.2-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index bc0cfd5..ad92360 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -35442576f7bd5b12b961c64144c6cb2d strict-0.3.2.tar.gz +SHA512 (strict-0.4.0.1.tar.gz) = e0c37396fa507ad4d03e46ce4a02ec5bacbd7add75ca551433671871d3e7dde0eb0c620182904d1bdeb7b80e1b311a70f36030cbeae63d8776059150fef30235