Proposal: Strict types
johan.tibell at gmail.com
Fri Feb 18 03:41:18 CET 2011
On Thu, Feb 17, 2011 at 6:23 PM, Edward Z. Yang <ezyang at mit.edu> wrote:
> 1. Move strict Maybe and Either into base
> We create a new module Data.Maybe.Strict and Data.Either.Strict
> which implement the following semantics:
> Just _|_ = _|_
> Left _|_ = _|_
> Right _|_ = _|_
> We do not expose a left-strict or right-strict version of Either.
> 2. Move strict Tuple into base
> We create a new module Data.Tuple.Strict that defines a new data
> type Pair with:
> Pair _|_ a = _|_
> Pair a _|_ = _|_
Even if I couldn't have the remaining things in this proposal I
definitely want these (in base or HP). Every other package define
their own versions of these internally, under different names.
Having strict types lets you express your strictness properties much
simpler, by changing the return type of a function instead of
littering it with bang patterns and seq:s.
More information about the Libraries