Skip to content

Commit

Permalink
relax Bifunctor3C to Bifunctor3 in ReaderEither.getReaderValidation
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Feb 27, 2020
1 parent 9ea6023 commit 80baf40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ high state of flux, you're at risk of it changing without notice.
- add missing instances to `getValidation` (@gcanti)
- `IOEither`
- relax `Bifunctor2C` to `Bifunctor2` in `getIOValidation` (@gcanti)
- `ReaderEither`
- relax `Bifunctor3C` to `Bifunctor3` in `getReaderValidation` (@gcanti)

# 2.5.1

Expand Down
8 changes: 3 additions & 5 deletions src/ReaderEither.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @since 2.0.0
*/
import { Alt3, Alt3C } from './Alt'
import { Bifunctor3, Bifunctor3C } from './Bifunctor'
import { Bifunctor3 } from './Bifunctor'
import * as E from './Either'
import { getEitherM } from './EitherT'
import { Monad3, Monad3C } from './Monad'
Expand Down Expand Up @@ -139,14 +139,12 @@ export function local<Q, R>(f: (f: Q) => R): <E, A>(ma: ReaderEither<R, E, A>) =
*/
export function getReaderValidation<E>(
S: Semigroup<E>
): Monad3C<URI, E> & Bifunctor3C<URI, E> & Alt3C<URI, E> & MonadThrow3C<URI, E> {
): Monad3C<URI, E> & Bifunctor3<URI> & Alt3C<URI, E> & MonadThrow3C<URI, E> {
const T = getValidationM(S, reader)
return {
URI,
_E: undefined as any,
throwError: readerEither.throwError,
bimap: readerEither.bimap,
mapLeft: readerEither.mapLeft,
...readerEither,
...T
}
}
Expand Down

0 comments on commit 80baf40

Please sign in to comment.