diff --git a/docs/modules/MonadTask.ts.md b/docs/modules/MonadTask.ts.md index cd9d65234..9252dcc38 100644 --- a/docs/modules/MonadTask.ts.md +++ b/docs/modules/MonadTask.ts.md @@ -25,7 +25,7 @@ Lift a computation from the `Task` monad **Signature** ```ts -export interface MonadTask extends Monad { +export interface MonadTask extends MonadIO { readonly fromTask: (fa: Task) => HKT } ``` @@ -37,7 +37,7 @@ Added in v2.0.0 **Signature** ```ts -export interface MonadTask1 extends Monad1 { +export interface MonadTask1 extends MonadIO1 { readonly fromTask: (fa: Task) => Kind } ``` @@ -49,7 +49,7 @@ Added in v2.0.0 **Signature** ```ts -export interface MonadTask2 extends Monad2 { +export interface MonadTask2 extends MonadIO2 { readonly fromTask: (fa: Task) => Kind2 } ``` @@ -61,7 +61,7 @@ Added in v2.0.0 **Signature** ```ts -export interface MonadTask2C extends Monad2C { +export interface MonadTask2C extends MonadIO2C { readonly fromTask: (fa: Task) => Kind2 } ``` @@ -73,7 +73,7 @@ Added in v2.0.0 **Signature** ```ts -export interface MonadTask3 extends Monad3 { +export interface MonadTask3 extends MonadIO3 { readonly fromTask: (fa: Task) => Kind3 } ``` diff --git a/docs/modules/ReaderTaskEither.ts.md b/docs/modules/ReaderTaskEither.ts.md index 01f10a12b..8c2b1b026 100644 --- a/docs/modules/ReaderTaskEither.ts.md +++ b/docs/modules/ReaderTaskEither.ts.md @@ -105,12 +105,7 @@ Added in v2.0.0 **Signature** ```ts -export const readerTaskEither: Monad3 & - Bifunctor3 & - Alt3 & - MonadIO3 & - MonadTask3 & - MonadThrow3 = ... +export const readerTaskEither: Monad3 & Bifunctor3 & Alt3 & MonadTask3 & MonadThrow3 = ... ``` Added in v2.0.0 diff --git a/docs/modules/Task.ts.md b/docs/modules/Task.ts.md index b09a0cf56..f555257e6 100644 --- a/docs/modules/Task.ts.md +++ b/docs/modules/Task.ts.md @@ -65,7 +65,7 @@ Added in v2.0.0 **Signature** ```ts -export const task: Monad1 & MonadIO1 & MonadTask1 = ... +export const task: Monad1 & MonadTask1 = ... ``` Added in v2.0.0 diff --git a/docs/modules/TaskEither.ts.md b/docs/modules/TaskEither.ts.md index 0b73a6cff..60b6f1deb 100644 --- a/docs/modules/TaskEither.ts.md +++ b/docs/modules/TaskEither.ts.md @@ -134,12 +134,7 @@ Added in v2.0.0 **Signature** ```ts -export const taskEither: Monad2 & - Bifunctor2 & - Alt2 & - MonadIO2 & - MonadTask2 & - MonadThrow2 = ... +export const taskEither: Monad2 & Bifunctor2 & Alt2 & MonadTask2 & MonadThrow2 = ... ``` Added in v2.0.0 diff --git a/src/MonadTask.ts b/src/MonadTask.ts index 971a79edb..a502a1eaa 100644 --- a/src/MonadTask.ts +++ b/src/MonadTask.ts @@ -2,40 +2,40 @@ * @file Lift a computation from the `Task` monad */ import { HKT, Kind, Kind2, Kind3, URIS, URIS2, URIS3 } from './HKT' -import { Monad, Monad1, Monad2, Monad2C, Monad3 } from './Monad' +import { MonadIO, MonadIO1, MonadIO2, MonadIO2C, MonadIO3 } from './MonadIO' import { Task } from './Task' /** * @since 2.0.0 */ -export interface MonadTask extends Monad { +export interface MonadTask extends MonadIO { readonly fromTask: (fa: Task) => HKT } /** * @since 2.0.0 */ -export interface MonadTask1 extends Monad1 { +export interface MonadTask1 extends MonadIO1 { readonly fromTask: (fa: Task) => Kind } /** * @since 2.0.0 */ -export interface MonadTask2 extends Monad2 { +export interface MonadTask2 extends MonadIO2 { readonly fromTask: (fa: Task) => Kind2 } /** * @since 2.0.0 */ -export interface MonadTask2C extends Monad2C { +export interface MonadTask2C extends MonadIO2C { readonly fromTask: (fa: Task) => Kind2 } /** * @since 2.0.0 */ -export interface MonadTask3 extends Monad3 { +export interface MonadTask3 extends MonadIO3 { readonly fromTask: (fa: Task) => Kind3 } diff --git a/src/ReaderTaskEither.ts b/src/ReaderTaskEither.ts index a5341b9f4..de35278bb 100644 --- a/src/ReaderTaskEither.ts +++ b/src/ReaderTaskEither.ts @@ -4,7 +4,6 @@ import { Either } from './Either' import { IO } from './IO' import { IOEither } from './IOEither' import { Monad3 } from './Monad' -import { MonadIO3 } from './MonadIO' import { MonadTask3 } from './MonadTask' import { MonadThrow3 } from './MonadThrow' import { Monoid } from './Monoid' @@ -204,12 +203,7 @@ export function local(f: (f: Q) => R): (ma: ReaderTaskEither & - Bifunctor3 & - Alt3 & - MonadIO3 & - MonadTask3 & - MonadThrow3 = { +export const readerTaskEither: Monad3 & Bifunctor3 & Alt3 & MonadTask3 & MonadThrow3 = { URI, map: T.map, of: right, diff --git a/src/Task.ts b/src/Task.ts index 752485062..d025f73c6 100644 --- a/src/Task.ts +++ b/src/Task.ts @@ -4,11 +4,10 @@ */ import { IO } from './IO' import { Monad1 } from './Monad' -import { MonadIO1 } from './MonadIO' import { MonadTask1 } from './MonadTask' import { Monoid } from './Monoid' -import { Semigroup } from './Semigroup' import { pipeable } from './pipeable' +import { Semigroup } from './Semigroup' declare module './HKT' { interface URItoKind { @@ -116,7 +115,7 @@ export function of(a: A): Task { /** * @since 2.0.0 */ -export const task: Monad1 & MonadIO1 & MonadTask1 = { +export const task: Monad1 & MonadTask1 = { URI, map: (ma, f) => () => ma().then(f), of, diff --git a/src/TaskEither.ts b/src/TaskEither.ts index 05e463372..b818dab7d 100644 --- a/src/TaskEither.ts +++ b/src/TaskEither.ts @@ -10,7 +10,6 @@ import { Lazy } from './function' import { IO } from './IO' import { IOEither } from './IOEither' import { Monad2, Monad2C } from './Monad' -import { MonadIO2 } from './MonadIO' import { MonadTask2 } from './MonadTask' import { MonadThrow2 } from './MonadThrow' import { Monoid } from './Monoid' @@ -232,12 +231,7 @@ export function getTaskValidation(S: Semigroup): Monad2C & Alt2C & - Bifunctor2 & - Alt2 & - MonadIO2 & - MonadTask2 & - MonadThrow2 = { +export const taskEither: Monad2 & Bifunctor2 & Alt2 & MonadTask2 & MonadThrow2 = { URI, bimap: T.bimap, mapLeft: T.mapLeft,