Skip to content

Commit

Permalink
Version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Avaq committed Apr 4, 2018
1 parent 50e2968 commit 22017a0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright (c) 2017 Aldwin Vlasblom
Copyright (c) 2018 Aldwin Vlasblom

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
39 changes: 21 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@

[Fluture][] type definitions for [Sanctuary][].

> `npm install --save fluture sanctuary-def fluture-sanctuary-types`
```console
$ npm install --save fluture sanctuary-def fluture-sanctuary-types
```

## Usage

```js
const {create, env} = require('sanctuary-def');
Expand All @@ -19,35 +23,34 @@ const Future = require('fluture');
const def = create({checkTypes: true, env: env.concat(flutureEnv)});
```

## types
## API

The package also exports the type constructors in named exports.

### `FutureType :: Type -> Type -> Type`
<h4 name="FutureType"><code><a href="https://github.com/fluture-js/fluture-sanctuary-types/blob/v2.0.0/index.js#L52">FutureType :: Type -⁠> Type -⁠> Type</a></code></h4>

The binary type constructor for members of Future.

```js
const {test, String, Number} = require('sanctuary-def');
const {env, FutureType} = require('fluture-sanctuary-types');
const {of} = require('fluture');

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

### `ConcurrentFutureType :: Type -> Type -> Type`
<h4 name="ConcurrentFutureType"><code><a href="https://github.com/fluture-js/fluture-sanctuary-types/blob/v2.0.0/index.js#L67">ConcurrentFutureType :: Type -> Type -> Type</a></code></h4>

The binary type constructor for members of ConcurrentFuture.

```js
const {test, String, Number} = require('sanctuary-def');
const {env, ConcurrentFutureType} = require('fluture-sanctuary-types');
const {of, Par} = require('fluture');

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

<h4 name="env"><code><a href="https://github.com/fluture-js/fluture-sanctuary-types/blob/v2.0.0/index.js#L85">env :: Array Type</a></code></h4>

An Array containing all types applied to [`$.Unknown`][Unknown] for
direct use as a Sanctuary environment, as shown in [Usage](#usage).

[Fluture]: https://github.com/fluture-js/Fluture
[Sanctuary]: https://sanctuary.js.org/
[Unknown]: https://github.com/sanctuary-js/sanctuary-def#Unknown
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fluture-sanctuary-types",
"version": "1.5.0",
"version": "2.0.0",
"description": "Fluture type definitions for Sanctuary",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 22017a0

Please sign in to comment.