From b8d6aa98e3b5ca18e8c5e76752a1e6729db7a386 Mon Sep 17 00:00:00 2001 From: David Chambers Date: Wed, 28 Dec 2016 08:52:01 +1300 Subject: [PATCH 1/2] circumvent Safari bug --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 829445d..76e3faf 100644 --- a/index.js +++ b/index.js @@ -1247,8 +1247,8 @@ //. > chain(n => s => s.slice(0, n), s => Math.ceil(s.length / 2))('Haskell') //. 'Hask' //. ``` - function chain(f, chain) { - return Chain.methods.chain(chain)(f); + function chain(f, chain_) { + return Chain.methods.chain(chain_)(f); } //# join :: Chain m => m (m a) -> m a @@ -1447,8 +1447,8 @@ //. > extend(xs => xs.length, ['foo', 'bar', 'baz', 'quux']) //. [4] //. ``` - function extend(f, extend) { - return Extend.methods.extend(extend)(f); + function extend(f, extend_) { + return Extend.methods.extend(extend_)(f); } //# extract :: Comonad w => w a -> a From dfa9f25c97ac0f0f7d6a4e9e1b98406e00aab287 Mon Sep 17 00:00:00 2001 From: David Chambers Date: Wed, 28 Dec 2016 09:22:20 +1300 Subject: [PATCH 2/2] Version 1.3.1 --- Makefile | 2 +- README.md | 88 ++++++++++++++++++++++++++-------------------------- package.json | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Makefile b/Makefile index 09e054d..a5b1fbe 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ NPM = npm PREDOCTEST = scripts/predoctest REMEMBER_BOWER = node_modules/.bin/remember-bower TRANSCRIBE = node_modules/.bin/transcribe -XYZ = node_modules/.bin/xyz --repo git@github.com:sanctuary-js/sanctuary-type-classes.git --script scripts/prepublish +XYZ = node_modules/.bin/xyz --branch v1 --repo git@github.com:sanctuary-js/sanctuary-type-classes.git --script scripts/prepublish TEST = $(shell find test -name '*.js' | sort) diff --git a/README.md b/README.md index ba2de6a..74c61ad 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ This project provides: ## API -

TypeClass :: (String, Array TypeClass, a -> Boolean) -> TypeClass

+

TypeClass :: (String, Array TypeClass, a -> Boolean) -> TypeClass

The arguments are: @@ -89,7 +89,7 @@ dependencies; `false` otherwise. to define parametrically polymorphic functions which verify their type-class constraints at run time. -

Setoid :: TypeClass

+

Setoid :: TypeClass

`TypeClass` value for [Setoid][]. @@ -98,7 +98,7 @@ type-class constraints at run time. true ``` -

Semigroup :: TypeClass

+

Semigroup :: TypeClass

`TypeClass` value for [Semigroup][]. @@ -110,7 +110,7 @@ true false ``` -

Monoid :: TypeClass

+

Monoid :: TypeClass

`TypeClass` value for [Monoid][]. @@ -122,7 +122,7 @@ true false ``` -

Functor :: TypeClass

+

Functor :: TypeClass

`TypeClass` value for [Functor][]. @@ -134,7 +134,7 @@ true false ``` -

Bifunctor :: TypeClass

+

Bifunctor :: TypeClass

`TypeClass` value for [Bifunctor][]. @@ -146,7 +146,7 @@ true false ``` -

Profunctor :: TypeClass

+

Profunctor :: TypeClass

`TypeClass` value for [Profunctor][]. @@ -158,7 +158,7 @@ true false ``` -

Apply :: TypeClass

+

Apply :: TypeClass

`TypeClass` value for [Apply][]. @@ -170,7 +170,7 @@ true false ``` -

Applicative :: TypeClass

+

Applicative :: TypeClass

`TypeClass` value for [Applicative][]. @@ -182,7 +182,7 @@ true false ``` -

Chain :: TypeClass

+

Chain :: TypeClass

`TypeClass` value for [Chain][]. @@ -194,7 +194,7 @@ true false ``` -

ChainRec :: TypeClass

+

ChainRec :: TypeClass

`TypeClass` value for [ChainRec][]. @@ -206,7 +206,7 @@ true false ``` -

Monad :: TypeClass

+

Monad :: TypeClass

`TypeClass` value for [Monad][]. @@ -218,7 +218,7 @@ true false ``` -

Alt :: TypeClass

+

Alt :: TypeClass

`TypeClass` value for [Alt][]. @@ -230,7 +230,7 @@ true false ``` -

Plus :: TypeClass

+

Plus :: TypeClass

`TypeClass` value for [Plus][]. @@ -242,7 +242,7 @@ true false ``` -

Alternative :: TypeClass

+

Alternative :: TypeClass

`TypeClass` value for [Alternative][]. @@ -254,7 +254,7 @@ true false ``` -

Foldable :: TypeClass

+

Foldable :: TypeClass

`TypeClass` value for [Foldable][]. @@ -266,7 +266,7 @@ true false ``` -

Traversable :: TypeClass

+

Traversable :: TypeClass

`TypeClass` value for [Traversable][]. @@ -278,7 +278,7 @@ true false ``` -

Extend :: TypeClass

+

Extend :: TypeClass

`TypeClass` value for [Extend][]. @@ -290,7 +290,7 @@ true false ``` -

Comonad :: TypeClass

+

Comonad :: TypeClass

`TypeClass` value for [Comonad][]. @@ -302,7 +302,7 @@ true false ``` -

toString :: a -> String

+

toString :: a -> String

Returns a useful string representation of its argument. @@ -328,7 +328,7 @@ and Object. 'Cons(1, Cons(2, Cons(3, Nil)))' ``` -

equals :: (a, b) -> Boolean

+

equals :: (a, b) -> Boolean

Returns `true` if its arguments are of the same type and equal according to the type's [`fantasy-land/equals`][] method; `false` otherwise. @@ -357,7 +357,7 @@ true false ``` -

concat :: Semigroup a => (a, a) -> a

+

concat :: Semigroup a => (a, a) -> a

Function wrapper for [`fantasy-land/concat`][]. @@ -378,7 +378,7 @@ built-in types: String, Array, and Object. Cons('foo', Cons('bar', Cons('baz', Cons('quux', Nil)))) ``` -

empty :: Monoid m => TypeRep m -> m

+

empty :: Monoid m => TypeRep m -> m

Function wrapper for [`fantasy-land/empty`][]. @@ -399,7 +399,7 @@ built-in types: String, Array, and Object. Nil ``` -

map :: Functor f => (a -> b, f a) -> f b

+

map :: Functor f => (a -> b, f a) -> f b

Function wrapper for [`fantasy-land/map`][]. @@ -426,7 +426,7 @@ Nil Cons(1, Cons(2, Cons(3, Nil))) ``` -

bimap :: Bifunctor f => (a -> b, c -> d, f a c) -> f b d

+

bimap :: Bifunctor f => (a -> b, c -> d, f a c) -> f b d

Function wrapper for [`fantasy-land/bimap`][]. @@ -435,7 +435,7 @@ Function wrapper for [`fantasy-land/bimap`][]. Tuple('FOO', 8) ``` -

promap :: Profunctor p => (a -> b, c -> d, p b c) -> p a d

+

promap :: Profunctor p => (a -> b, c -> d, p b c) -> p a d

Function wrapper for [`fantasy-land/promap`][]. @@ -447,7 +447,7 @@ built-in types: Function. 11 ``` -

ap :: Apply f => (f (a -> b), f a) -> f b

+

ap :: Apply f => (f (a -> b), f a) -> f b

Function wrapper for [`fantasy-land/ap`][]. @@ -468,7 +468,7 @@ Identity(8) Cons(4, Cons(10, Cons(256, Cons(10000, Nil)))) ``` -

lift2 :: Apply f => (a -> b -> c, f a, f b) -> f c

+

lift2 :: Apply f => (a -> b -> c, f a, f b) -> f c

Lifts `a -> b -> c` to `Apply f => f a -> f b -> f c` and returns the result of applying this to the given arguments. @@ -485,7 +485,7 @@ See also [`lift3`](#lift3). Identity(1000) ``` -

lift3 :: Apply f => (a -> b -> c -> d, f a, f b, f c) -> f d

+

lift3 :: Apply f => (a -> b -> c -> d, f a, f b, f c) -> f d

Lifts `a -> b -> c -> d` to `Apply f => f a -> f b -> f c -> f d` and returns the result of applying this to the given arguments. @@ -502,7 +502,7 @@ See also [`lift2`](#lift2). Identity('') ``` -

apFirst :: Apply f => (f a, f b) -> f a

+

apFirst :: Apply f => (f a, f b) -> f a

Combines two effectful actions, keeping only the result of the first. Equivalent to Haskell's `(<*)` function. @@ -519,7 +519,7 @@ See also [`apSecond`](#apSecond). Identity(1) ``` -

apSecond :: Apply f => (f a, f b) -> f b

+

apSecond :: Apply f => (f a, f b) -> f b

Combines two effectful actions, keeping only the result of the second. Equivalent to Haskell's `(*>)` function. @@ -536,7 +536,7 @@ See also [`apFirst`](#apFirst). Identity(2) ``` -

of :: Applicative f => (TypeRep f, a) -> f a

+

of :: Applicative f => (TypeRep f, a) -> f a

Function wrapper for [`fantasy-land/of`][]. @@ -554,7 +554,7 @@ built-in types: Array and Function. Cons(42, Nil) ``` -

chain :: Chain m => (a -> m b, m a) -> m b

+

chain :: Chain m => (a -> m b, m a) -> m b

Function wrapper for [`fantasy-land/chain`][]. @@ -572,7 +572,7 @@ Cons(1, Cons(3, Nil)) 'Hask' ``` -

join :: Chain m => m (m a) -> m a

+

join :: Chain m => m (m a) -> m a

Removes one level of nesting from a nested monadic structure. @@ -589,7 +589,7 @@ This function is derived from [`chain`](#chain). Identity(1) ``` -

chainRec :: ChainRec m => (TypeRep m, (a -> c, b -> c, a) -> m c, a) -> m b

+

chainRec :: ChainRec m => (TypeRep m, (a -> c, b -> c, a) -> m c, a) -> m b

Function wrapper for [`fantasy-land/chainRec`][]. @@ -606,7 +606,7 @@ built-in types: Array. ['oo!', 'oo?', 'on!', 'on?', 'no!', 'no?', 'nn!', 'nn?'] ``` -

filter :: (Applicative f, Foldable f, Monoid (f a)) => (a -> Boolean, f a) -> f a

+

filter :: (Applicative f, Foldable f, Monoid (f a)) => (a -> Boolean, f a) -> f a

Filters its second argument in accordance with the given predicate. @@ -623,7 +623,7 @@ See also [`filterM`](#filterM). Cons(1, Cons(3, Nil)) ``` -

filterM :: (Monad m, Monoid (m a)) => (a -> Boolean, m a) -> m a

+

filterM :: (Monad m, Monoid (m a)) => (a -> Boolean, m a) -> m a

Filters its second argument in accordance with the given predicate. @@ -640,7 +640,7 @@ See also [`filter`](#filter). Cons(1, Cons(3, Nil)) ``` -

alt :: Alt f => (f a, f a) -> f a

+

alt :: Alt f => (f a, f a) -> f a

Function wrapper for [`fantasy-land/alt`][]. @@ -661,7 +661,7 @@ Just(1) Just(2) ``` -

zero :: Plus f => TypeRep f -> f a

+

zero :: Plus f => TypeRep f -> f a

Function wrapper for [`fantasy-land/zero`][]. @@ -679,7 +679,7 @@ built-in types: Array and Object. Nothing ``` -

reduce :: Foldable f => ((b, a) -> b, b, f a) -> b

+

reduce :: Foldable f => ((b, a) -> b, b, f a) -> b

Function wrapper for [`fantasy-land/reduce`][]. @@ -694,7 +694,7 @@ built-in types: Array and Object. 'foobarbaz' ``` -

traverse :: (Applicative f, Traversable t) => (a -> f a, b -> f c, t b) -> f (t c)

+

traverse :: (Applicative f, Traversable t) => (a -> f a, b -> f c, t b) -> f (t c)

Function wrapper for [`fantasy-land/traverse`][]. @@ -711,7 +711,7 @@ See also [`sequence`](#sequence). Identity([2, 3, 4]) ``` -

sequence :: (Applicative f, Traversable t) => (a -> f a, t (f b)) -> f (t b)

+

sequence :: (Applicative f, Traversable t) => (a -> f a, t (f b)) -> f (t b)

Inverts the given `t (f b)` to produce an `f (t b)`. @@ -725,7 +725,7 @@ This function is derived from [`traverse`](#traverse). Identity([1, 2, 3]) ``` -

extend :: Extend w => (w a -> b, w a) -> w b

+

extend :: Extend w => (w a -> b, w a) -> w b

Function wrapper for [`fantasy-land/extend`][]. @@ -737,7 +737,7 @@ built-in types: Array. [4] ``` -

extract :: Comonad w => w a -> a

+

extract :: Comonad w => w a -> a

Function wrapper for [`fantasy-land/extract`][]. diff --git a/package.json b/package.json index 1bee00c..681950a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sanctuary-type-classes", - "version": "1.3.0", + "version": "1.3.1", "description": "Standard library for Fantasy Land", "license": "MIT", "repository": {