Skip to content

Commit

Permalink
Version 0.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchambers committed Apr 29, 2017
1 parent e350170 commit 972f11a
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 51 deletions.
96 changes: 48 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ add('X');
// The value at position 1 is not a member of ‘Number’.
```

<h4 name="__"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L188">__ :: Placeholder</a></code></h4>
<h4 name="__"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L188">__ :: Placeholder</a></code></h4>

The special placeholder value.

Expand All @@ -182,41 +182,41 @@ Conceptually, a type is a set of values. One can think of a value of
type `Type` as a function of type `Any -> Boolean` which tests values
for membership in the set (though this is an oversimplification).

<h4 name="Any"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L442">Any :: Type</a></code></h4>
<h4 name="Any"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L442">Any :: Type</a></code></h4>

Type comprising every JavaScript value.

<h4 name="AnyFunction"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L447">AnyFunction :: Type</a></code></h4>
<h4 name="AnyFunction"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L447">AnyFunction :: Type</a></code></h4>

Type comprising every Function value.

<h4 name="Arguments"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L452">Arguments :: Type</a></code></h4>
<h4 name="Arguments"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L452">Arguments :: Type</a></code></h4>

Type comprising every [`arguments`][arguments] object.

<h4 name="Array"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L457">Array :: Type -> Type</a></code></h4>
<h4 name="Array"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L457">Array :: Type -> Type</a></code></h4>

Constructor for homogeneous Array types.

<h4 name="Boolean"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L462">Boolean :: Type</a></code></h4>
<h4 name="Boolean"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L462">Boolean :: Type</a></code></h4>

Type comprising `true` and `false`.

<h4 name="Date"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L467">Date :: Type</a></code></h4>
<h4 name="Date"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L467">Date :: Type</a></code></h4>

Type comprising every Date value.

<h4 name="Error"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L472">Error :: Type</a></code></h4>
<h4 name="Error"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L472">Error :: Type</a></code></h4>

Type comprising every Error value, including values of more specific
constructors such as [`SyntaxError`][] and [`TypeError`][].

<h4 name="FiniteNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L478">FiniteNumber :: Type</a></code></h4>
<h4 name="FiniteNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L478">FiniteNumber :: Type</a></code></h4>

Type comprising every [`ValidNumber`][] value except `Infinity` and
`-Infinity`.

<h4 name="Function"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L487">Function :: Array Type -> Type</a></code></h4>
<h4 name="Function"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L487">Function :: Array Type -> Type</a></code></h4>

Constructor for Function types.

Expand All @@ -226,60 +226,60 @@ Examples:
type; and
- `$.Function([a, b, a])` represents the `(a, b) -> a` type.

<h4 name="GlobalRegExp"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L524">GlobalRegExp :: Type</a></code></h4>
<h4 name="GlobalRegExp"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L524">GlobalRegExp :: Type</a></code></h4>

Type comprising every [`RegExp`][] value whose `global` flag is `true`.

See also [`NonGlobalRegExp`][].

<h4 name="Integer"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L534">Integer :: Type</a></code></h4>
<h4 name="Integer"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L534">Integer :: Type</a></code></h4>

Type comprising every integer in the range
[[`Number.MIN_SAFE_INTEGER`][min] .. [`Number.MAX_SAFE_INTEGER`][max]].

<h4 name="NegativeFiniteNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L548">NegativeFiniteNumber :: Type</a></code></h4>
<h4 name="NegativeFiniteNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L548">NegativeFiniteNumber :: Type</a></code></h4>

Type comprising every [`FiniteNumber`][] value less than zero.

<h4 name="NegativeInteger"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L556">NegativeInteger :: Type</a></code></h4>
<h4 name="NegativeInteger"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L556">NegativeInteger :: Type</a></code></h4>

Type comprising every [`Integer`][] value less than zero.

<h4 name="NegativeNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L564">NegativeNumber :: Type</a></code></h4>
<h4 name="NegativeNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L564">NegativeNumber :: Type</a></code></h4>

Type comprising every [`Number`][] value less than zero.

<h4 name="NonGlobalRegExp"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L572">NonGlobalRegExp :: Type</a></code></h4>
<h4 name="NonGlobalRegExp"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L572">NonGlobalRegExp :: Type</a></code></h4>

Type comprising every [`RegExp`][] value whose `global` flag is `false`.

See also [`GlobalRegExp`][].

<h4 name="NonZeroFiniteNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L582">NonZeroFiniteNumber :: Type</a></code></h4>
<h4 name="NonZeroFiniteNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L582">NonZeroFiniteNumber :: Type</a></code></h4>

Type comprising every [`FiniteNumber`][] value except `0` and `-0`.

<h4 name="NonZeroInteger"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L590">NonZeroInteger :: Type</a></code></h4>
<h4 name="NonZeroInteger"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L590">NonZeroInteger :: Type</a></code></h4>

Type comprising every [`Integer`][] value except `0` and `-0`.

<h4 name="NonZeroValidNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L598">NonZeroValidNumber :: Type</a></code></h4>
<h4 name="NonZeroValidNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L598">NonZeroValidNumber :: Type</a></code></h4>

Type comprising every [`ValidNumber`][] value except `0` and `-0`.

<h4 name="Null"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L606">Null :: Type</a></code></h4>
<h4 name="Null"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L606">Null :: Type</a></code></h4>

Type whose sole member is `null`.

<h4 name="Nullable"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L611">Nullable :: Type -> Type</a></code></h4>
<h4 name="Nullable"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L611">Nullable :: Type -> Type</a></code></h4>

Constructor for types which include `null` as a member.

<h4 name="Number"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L623">Number :: Type</a></code></h4>
<h4 name="Number"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L623">Number :: Type</a></code></h4>

Type comprising every primitive Number value (including `NaN`).

<h4 name="Object"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L628">Object :: Type</a></code></h4>
<h4 name="Object"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L628">Object :: Type</a></code></h4>

Type comprising every "plain" Object value. Specifically, values
created via:
Expand All @@ -289,28 +289,28 @@ created via:
- the `new` operator in conjunction with `Object` or a custom
constructor function.

<h4 name="Pair"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L639">Pair :: Type -> Type -> Type</a></code></h4>
<h4 name="Pair"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L639">Pair :: Type -> Type -> Type</a></code></h4>

Constructor for tuple types of length 2. Arrays are said to represent
tuples. `['foo', 42]` is a member of `Pair String Number`.

<h4 name="PositiveFiniteNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L650">PositiveFiniteNumber :: Type</a></code></h4>
<h4 name="PositiveFiniteNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L650">PositiveFiniteNumber :: Type</a></code></h4>

Type comprising every [`FiniteNumber`][] value greater than zero.

<h4 name="PositiveInteger"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L658">PositiveInteger :: Type</a></code></h4>
<h4 name="PositiveInteger"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L658">PositiveInteger :: Type</a></code></h4>

Type comprising every [`Integer`][] value greater than zero.

<h4 name="PositiveNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L666">PositiveNumber :: Type</a></code></h4>
<h4 name="PositiveNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L666">PositiveNumber :: Type</a></code></h4>

Type comprising every [`Number`][] value greater than zero.

<h4 name="RegExp"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L674">RegExp :: Type</a></code></h4>
<h4 name="RegExp"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L674">RegExp :: Type</a></code></h4>

Type comprising every RegExp value.

<h4 name="RegexFlags"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L679">RegexFlags :: Type</a></code></h4>
<h4 name="RegexFlags"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L679">RegexFlags :: Type</a></code></h4>

Type comprising the canonical RegExp flags:

Expand All @@ -323,34 +323,34 @@ Type comprising the canonical RegExp flags:
- `'im'`
- `'gim'`

<h4 name="StrMap"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L696">StrMap :: Type -> Type</a></code></h4>
<h4 name="StrMap"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L696">StrMap :: Type -> Type</a></code></h4>

Constructor for homogeneous Object types.

`{foo: 1, bar: 2, baz: 3}`, for example, is a member of `StrMap Number`;
`{foo: 1, bar: 2, baz: 'XXX'}` is not.

<h4 name="String"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L711">String :: Type</a></code></h4>
<h4 name="String"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L711">String :: Type</a></code></h4>

Type comprising every primitive String value.

<h4 name="Symbol"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L716">Symbol :: Type</a></code></h4>
<h4 name="Symbol"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L716">Symbol :: Type</a></code></h4>

Type comprising every Symbol value.

<h4 name="Type"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L721">Type :: Type</a></code></h4>
<h4 name="Type"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L721">Type :: Type</a></code></h4>

Type comprising every `Type` value.

<h4 name="TypeClass"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L726">TypeClass :: Type</a></code></h4>
<h4 name="TypeClass"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L726">TypeClass :: Type</a></code></h4>

Type comprising every [`TypeClass`][] value.

<h4 name="Undefined"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L732">Undefined :: Type</a></code></h4>
<h4 name="Undefined"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L732">Undefined :: Type</a></code></h4>

Type whose sole member is `undefined`.

<h4 name="Unknown"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L737">Unknown :: Type</a></code></h4>
<h4 name="Unknown"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L737">Unknown :: Type</a></code></h4>

Type used to represent missing type information. The type of `[]`,
for example, is `Array ???`.
Expand All @@ -367,15 +367,15 @@ to include an infinite number of types in an environment:
- `List (List (List String))`
- `...`

<h4 name="ValidDate"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L755">ValidDate :: Type</a></code></h4>
<h4 name="ValidDate"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L755">ValidDate :: Type</a></code></h4>

Type comprising every [`Date`][] value except `new Date(NaN)`.

<h4 name="ValidNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L763">ValidNumber :: Type</a></code></h4>
<h4 name="ValidNumber"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L763">ValidNumber :: Type</a></code></h4>

Type comprising every [`Number`][] value except `NaN`.

<h4 name="env"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L771">env :: Array Type</a></code></h4>
<h4 name="env"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L771">env :: Array Type</a></code></h4>

An array of [types][]:

Expand All @@ -394,7 +394,7 @@ An array of [types][]:
- <code><a href="#Symbol">Symbol</a></code>
- <code><a href="#Undefined">Undefined</a></code>

<h4 name="test"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L1216">test :: Array Type -> Type -> a -> Boolean</a></code></h4>
<h4 name="test"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L1216">test :: Array Type -> Type -> a -> Boolean</a></code></h4>

Takes an environment, a type, and any value. Returns `true` if the value
is a member of the type; `false` otherwise.
Expand All @@ -421,7 +421,7 @@ and validate the bodies of incoming POST requests against these types.

sanctuary-def provides several functions for defining types.

<h4 name="NullaryType"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L1247">NullaryType :: String -> String -> (Any -> Boolean) -> Type</a></code></h4>
<h4 name="NullaryType"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L1247">NullaryType :: String -> String -> (Any -> Boolean) -> Type</a></code></h4>

Type constructor for types with no type variables (such as [`Number`][]).

Expand Down Expand Up @@ -484,7 +484,7 @@ rem(42, 0);
// The value at position 1 is not a member of ‘NonZeroInteger’.
```

<h4 name="UnaryType"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L1322">UnaryType :: String -> String -> (Any -> Boolean) -> (t a -> Array a) -> (Type -> Type)</a></code></h4>
<h4 name="UnaryType"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L1322">UnaryType :: String -> String -> (Any -> Boolean) -> (t a -> Array a) -> (Type -> Type)</a></code></h4>

Type constructor for types with one type variable (such as [`Array`][]).

Expand Down Expand Up @@ -563,7 +563,7 @@ fromMaybe(0, Just('XXX'));
// Since there is no type of which all the above values are members, the type-variable constraint has been violated.
```
<h4 name="BinaryType"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L1431">BinaryType :: String -> String -> (Any -> Boolean) -> (t a b -> Array a) -> (t a b -> Array b) -> (Type -> Type -> Type)</a></code></h4>
<h4 name="BinaryType"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L1431">BinaryType :: String -> String -> (Any -> Boolean) -> (t a b -> Array a) -> (t a b -> Array b) -> (Type -> Type -> Type)</a></code></h4>
Type constructor for types with two type variables (such as [`Pair`][]).
Expand Down Expand Up @@ -654,7 +654,7 @@ showCard(Pair('X', '♠'));
// The value at position 1 is not a member of ‘Rank’.
```
<h4 name="EnumType"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L1566">EnumType :: String -> String -> Array Any -> Type</a></code></h4>
<h4 name="EnumType"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L1566">EnumType :: String -> String -> Array Any -> Type</a></code></h4>
Type constructor for [enumerated types][] (such as [`RegexFlags`][]).
Expand All @@ -677,7 +677,7 @@ const Denomination = $.EnumType(
);
```
<h4 name="RecordType"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L1595">RecordType :: StrMap Type -> Type</a></code></h4>
<h4 name="RecordType"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L1595">RecordType :: StrMap Type -> Type</a></code></h4>
`RecordType` is used to construct record types. The type definition
specifies the name and type of each required field.
Expand Down Expand Up @@ -727,7 +727,7 @@ dist(0);
// The value at position 1 is not a member of ‘{ x :: FiniteNumber, y :: FiniteNumber }’.
```
<h4 name="TypeVariable"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L1673">TypeVariable :: String -> Type</a></code></h4>
<h4 name="TypeVariable"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L1673">TypeVariable :: String -> Type</a></code></h4>
Polymorphism is powerful. Not being able to define a function for
all types would be very limiting indeed: one couldn't even define the
Expand Down Expand Up @@ -781,7 +781,7 @@ cmp(0, '1');
// Since there is no type of which all the above values are members, the type-variable constraint has been violated.
```
<h4 name="UnaryTypeVariable"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L1733">UnaryTypeVariable :: String -> (Type -> Type)</a></code></h4>
<h4 name="UnaryTypeVariable"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L1733">UnaryTypeVariable :: String -> (Type -> Type)</a></code></h4>
Combines [`UnaryType`][] and [`TypeVariable`][].
Expand Down Expand Up @@ -828,7 +828,7 @@ example, is `v`. One could replace `Functor => f` with `Map k` or with
This shallow inspection makes it possible to constrain a value's "outer"
and "inner" types independently.
<h4 name="BinaryTypeVariable"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.0/index.js#L1797">BinaryTypeVariable :: String -> (Type -> Type -> Type)</a></code></h4>
<h4 name="BinaryTypeVariable"><code><a href="https://github.com/sanctuary-js/sanctuary-def/blob/v0.10.1/index.js#L1797">BinaryTypeVariable :: String -> (Type -> Type -> Type)</a></code></h4>
Combines [`BinaryType`][] and [`TypeVariable`][].
Expand Down
Loading

0 comments on commit 972f11a

Please sign in to comment.