fp-ts-contrib icon indicating copy to clipboard operation
fp-ts-contrib copied to clipboard

using `Do(E.either)` results in "deprecated" warning

Open huntwj opened this issue 4 years ago • 1 comments

🐛 Bug report

Current Behavior

Using the Either type with the Do notation is marked as deprecated with the message "Use small, specific instances instead."

Do(E.either) // <-- `either` is marked deprecated
  .bind("name", value)
  .return(({name}) => ({out: name}));

Expected behavior

It has no compiler warnings or errors.

Reproducible example

See above

Suggested solution(s)

Should either really be deprecated, or is there an alternate "smaller" type that we can use in these places?

Additional context

n/a

Your environment

Which versions of fp-ts-contrib are affected by this issue? Did this work in previous versions of fp-ts-contrib?

Software Version(s)
fp-ts 2.5.3
fp-ts-contrib 0.1.26
TypeScript 3.9.6 (build) and 4.3.2 (editor)

huntwj avatar Jun 22 '21 19:06 huntwj

Looks like you are using [email protected] (where E.either is deprecated). You can use E.Monad instead

gcanti avatar Jun 23 '21 05:06 gcanti