/fluture-sanctuary-types

Fluture type definitions for Sanctuary

Primary LanguageJavaScriptMIT LicenseMIT

fluture-sanctuary-types

Fluture type definitions for Sanctuary.

$ npm install --save fluture sanctuary-def fluture-sanctuary-types

Usage

import $ = from 'sanctuary-def';
import {env} from 'fluture-sanctuary-types';

const def = $.create ({checkTypes: true, env: $.env.concat (env)});

The binary type constructor for members of Future.

> $.test (env) (FutureType ($.String) ($.Number)) (Future.of (1));
true

The binary type constructor for members of ConcurrentFuture.

> $.test
.   (env)
.   (ConcurrentFutureType ($.String) ($.Number))
.   (Future.Par.of (1));
true

An Array containing all types applied to $.Unknown for direct use as a Sanctuary environment, as shown in Usage.