Skip to content

Commit

Permalink
version 2.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Apr 26, 2020
1 parent c97066d commit 5a18b7a
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
**Note**: Gaps between patch versions are faulty/broken releases. **Note**: A feature tagged as Experimental is in a
high state of flux, you're at risk of it changing without notice.

# 2.5.4

- **Polish**
- `StateT`
- add missing `StateM2C` and `StateM3C` (@qlonik)

# 2.5.3

- **Polish**
Expand Down
53 changes: 53 additions & 0 deletions docs/modules/StateT.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Added in v2.0.0
- [StateM (interface)](#statem-interface)
- [StateM1 (interface)](#statem1-interface)
- [StateM2 (interface)](#statem2-interface)
- [StateM2C (interface)](#statem2c-interface)
- [StateM3 (interface)](#statem3-interface)
- [StateM3C (interface)](#statem3c-interface)
- [StateT (interface)](#statet-interface)
- [StateT1 (interface)](#statet1-interface)
- [StateT2 (interface)](#statet2-interface)
Expand Down Expand Up @@ -93,6 +95,29 @@ export interface StateM2<M extends URIS2> {

Added in v2.0.0

# StateM2C (interface)

**Signature**

```ts
export interface StateM2C<M extends URIS2, E> {
readonly map: <S, A, B>(fa: StateT2<M, S, E, A>, f: (a: A) => B) => StateT2<M, S, E, B>
readonly of: <S, A>(a: A) => StateT2<M, S, E, A>
readonly ap: <S, A, B>(fab: StateT2<M, S, E, (a: A) => B>, fa: StateT2<M, S, E, A>) => StateT2<M, S, E, B>
readonly chain: <S, A, B>(fa: StateT2<M, S, E, A>, f: (a: A) => StateT2<M, S, E, B>) => StateT2<M, S, E, B>
readonly get: <S>() => StateT2<M, S, E, S>
readonly put: <S>(s: S) => StateT2<M, S, E, void>
readonly modify: <S>(f: (s: S) => S) => StateT2<M, S, E, void>
readonly gets: <S, A>(f: (s: S) => A) => StateT2<M, S, E, A>
readonly fromState: <S, A>(fa: State<S, A>) => StateT2<M, S, E, A>
readonly fromM: <S, A>(ma: Kind2<M, E, A>) => StateT2<M, S, E, A>
readonly evalState: <S, A>(ma: StateT2<M, S, E, A>, s: S) => Kind2<M, E, A>
readonly execState: <S, A>(ma: StateT2<M, S, E, A>, s: S) => Kind2<M, E, S>
}
```

Added in v2.5.4

# StateM3 (interface)

**Signature**
Expand Down Expand Up @@ -122,6 +147,32 @@ export interface StateM3<M extends URIS3> {

Added in v2.0.0

# StateM3C (interface)

**Signature**

```ts
export interface StateM3C<M extends URIS3, E> {
readonly map: <S, R, A, B>(fa: StateT3<M, S, R, E, A>, f: (a: A) => B) => StateT3<M, S, R, E, B>
readonly of: <S, R, A>(a: A) => StateT3<M, S, R, E, A>
readonly ap: <S, R, A, B>(fab: StateT3<M, S, R, E, (a: A) => B>, fa: StateT3<M, S, R, E, A>) => StateT3<M, S, R, E, B>
readonly chain: <S, R, A, B>(
fa: StateT3<M, S, R, E, A>,
f: (a: A) => StateT3<M, S, R, E, B>
) => StateT3<M, S, R, E, B>
readonly get: <R, S>() => StateT3<M, S, R, E, S>
readonly put: <R, S>(s: S) => StateT3<M, S, R, E, void>
readonly modify: <R, S>(f: (s: S) => S) => StateT3<M, S, R, E, void>
readonly gets: <S, R, A>(f: (s: S) => A) => StateT3<M, S, R, E, A>
readonly fromState: <S, R, A>(fa: State<S, A>) => StateT3<M, S, R, E, A>
readonly fromM: <S, R, A>(ma: Kind3<M, R, E, A>) => StateT3<M, S, R, E, A>
readonly evalState: <S, R, A>(ma: StateT3<M, S, R, E, A>, s: S) => Kind3<M, R, E, A>
readonly execState: <S, R, A>(ma: StateT3<M, S, R, E, A>, s: S) => Kind3<M, R, E, S>
}
```

Added in v2.5.4

# StateT (interface)

**Signature**
Expand Down Expand Up @@ -176,7 +227,9 @@ Added in v2.0.0

```ts
export declare function getStateM<M extends URIS3>(M: Monad3<M>): StateM3<M>
export declare function getStateM<M extends URIS3, E>(M: Monad3C<M, E>): StateM3C<M, E>
export declare function getStateM<M extends URIS2>(M: Monad2<M>): StateM2<M>
export declare function getStateM<M extends URIS2, E>(M: Monad2C<M, E>): StateM2C<M, E>
export declare function getStateM<M extends URIS>(M: Monad1<M>): StateM1<M>
export declare function getStateM<M>(M: Monad<M>): StateM<M>
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fp-ts",
"version": "2.5.3",
"version": "2.5.4",
"description": "Functional programming in TypeScript",
"files": [
"lib",
Expand Down
4 changes: 2 additions & 2 deletions src/StateT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ export interface StateM3C<M extends URIS3, E> {
/**
* @since 2.0.0
*/
export function getStateM<M extends URIS3, E>(M: Monad3C<M, E>): StateM3C<M, E>
export function getStateM<M extends URIS3>(M: Monad3<M>): StateM3<M>
export function getStateM<M extends URIS2, E>(M: Monad2C<M, E>): StateM2C<M, E>
export function getStateM<M extends URIS3, E>(M: Monad3C<M, E>): StateM3C<M, E>
export function getStateM<M extends URIS2>(M: Monad2<M>): StateM2<M>
export function getStateM<M extends URIS2, E>(M: Monad2C<M, E>): StateM2C<M, E>
export function getStateM<M extends URIS>(M: Monad1<M>): StateM1<M>
export function getStateM<M>(M: Monad<M>): StateM<M>
export function getStateM<M>(M: Monad<M>): StateM<M> {
Expand Down

0 comments on commit 5a18b7a

Please sign in to comment.