fluture-sanctuary-types
Version:
Fluture type definitions for Sanctuary
71 lines (61 loc) • 2.67 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('sanctuary-def'), require('sanctuary-type-identifiers'), require('fluture')) :
typeof define === 'function' && define.amd ? define(['exports', 'sanctuary-def', 'sanctuary-type-identifiers', 'fluture'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.flutureSanctuaryTypes = {}, global.sanctuaryDef, global.sanctuaryTypeIdentifiers, global.Fluture));
}(this, (function (exports, $, type, index_js) { 'use strict';
//. # fluture-sanctuary-types
// $$type :: String
var $$type = '@@type';
//# FutureType :: Type -> Type -> Type
//.
//. The binary type constructor for members of Future.
//.
//. ```js
//. > $.test (env)
//. . (FutureType ($.String) ($.Number))
//. . (Future['fantasy-land/of'] (1));
//. true
//. ```
var FutureType = $.BinaryType
(type.parse (index_js.Future[$$type]).name)
('https://github.com/fluture-js/Fluture#readme')
([])
(index_js.isFuture)
(index_js.extractLeft)
(index_js.extractRight);
//# ConcurrentFutureType :: Type -> Type -> Type
//.
//. The binary type constructor for members of ConcurrentFuture.
//.
//. ```js
//. > $.test (env)
//. . (ConcurrentFutureType ($.String) ($.Number))
//. . (Par['fantasy-land/of'] (1));
//. true
//. ```
var ConcurrentFutureType = $.BinaryType
(type.parse (index_js.Par[$$type]).name)
('https://github.com/fluture-js/Fluture#concurrentfuture')
([])
(function(x) { return type (x) === index_js.Par[$$type] && x !== index_js.Par; })
(function(f) { return (index_js.seq (f)).extractLeft (); })
(function(f) { return (index_js.seq (f)).extractRight (); });
//# env :: Array Type
//.
//. An Array containing all types applied to [`$.Unknown`][Unknown] for
//. direct use as a Sanctuary environment, as shown in [Usage](#usage).
var env = [
FutureType ($.Unknown) ($.Unknown),
ConcurrentFutureType ($.Unknown) ($.Unknown)
];
//. [Fluture]: https://github.com/fluture-js/Fluture
//. [Sanctuary]: https://sanctuary.js.org/
//. [sanctuary-def]: https://github.com/sanctuary-js/sanctuary-def
//. [Unknown]: https://github.com/sanctuary-js/sanctuary-def#Unknown
//. [esm]: https://github.com/standard-things/esm
//. [UMD]: https://github.com/umdjs/umd
exports.ConcurrentFutureType = ConcurrentFutureType;
exports.FutureType = FutureType;
exports.env = env;
Object.defineProperty(exports, '__esModule', { value: true });
})));