Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backporting from effect/* #1851

Open
gcanti opened this issue Apr 21, 2023 · 8 comments
Open

Backporting from effect/* #1851

gcanti opened this issue Apr 21, 2023 · 8 comments

Comments

@gcanti
Copy link
Owner

gcanti commented Apr 21, 2023

The following features can be backported without breaking changes:

2.14

2.15

2.16

TODO (Feel free to add a comment to this issue if you want to suggest any other backporting)

  • ???
@gcanti gcanti pinned this issue Apr 21, 2023
@sukovanej
Copy link
Contributor

sukovanej commented May 15, 2023

What about these.

tap*

  • tapEither (chainFirstEitherK / chainFirstEitherKW) feat: tapEither #1864
    • IOEither
    • TaskEither
    • ReaderEither
    • ReaderTaskEither
    • IOOption
    • Option
    • TaskOption
    • StateReaderTaskEither
  • tapIO (chainFirstIOK)
    • IOOption
    • Task
    • TaskOption
    • IOEither
    • ReaderIO
    • ReaderTask
    • TaskEither
    • ReaderTaskEither
    • StateReaderTaskEither
  • tapReaderEither (chainFirstReaderEitherK / chainFirstEitherKW)
    • ReaderTaskEither
  • tapReaderIO (chainFirstReaderIOK)
    • ReaderTask
    • ReaderTaskEither
  • tapReader (chainFirstReaderK / chainFirstIReaderKW)
    • ReaderIO
    • ReaderTask
    • ReaderEither
    • ReaderTaskEither
    • StateReaderTaskEither
  • tapReaderTask (chainFirstReaderTaskK)
    • ReaderTaskEither
  • tapTaskEither (chainFirstTaskEitherK / chainFirstITaskEitherKW)
    • ReaderTaskEither
  • tapTask (chainFirstTaskK)
    • TaskOption
    • ReaderTask
    • TaskEither
    • ReaderTaskEither
    • StateReaderTaskEither

tapError* - there are TE.orElseFirstTaskK, TE.orElseFirstIOK and IOE.orElseFirstIOK, would it make sense to add remaining tapError* combinators for types with errors?

@gcanti
Copy link
Owner Author

gcanti commented May 15, 2023

IMO it always makes sense since you get dual APIs and also a better name (tapError vs orElseFirst)

This was referenced May 15, 2023
@sukovanej
Copy link
Contributor

as and asUnit would be also nice, hm?

  • Either
  • IO
  • IOEither
  • IOOption
  • Option
  • Reader
  • ReaderEither
  • ReaderIO
  • ReaderTask
  • ReaderTaskEither

Does it make sense to implement as and asUnit for any data type having a functor instance or is there rule / law / practical reasoning for not having it for some data types? I see, in the effect/data, it's not implemented for arrays or Identity. What about State for example?

@gcanti
Copy link
Owner Author

gcanti commented May 17, 2023

No, there isn't a specific reason, they just don't seem very useful in the case of ReadonlyArray and Identity

@sukovanej
Copy link
Contributor

Are struct and tuple from Product considered stable enough to be backported?

@gcanti
Copy link
Owner Author

gcanti commented May 24, 2023

Are struct and tuple from Product considered stable enough to be backported?

@sukovanej I think it's better to wait a little longer

p.s.
Anything else you would like to add? otherwise we could release 2.16

@sukovanej
Copy link
Contributor

Ok. I don't have anything right now.

@christophgietl
Copy link

How about tap for Identity? For me it feels a little bit awkward to write O.tap and I.chainFirst.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants