-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
0.4.0 TaskEither issues #152
Comments
How is defined your |
@gcanti I've just copied/pasted the lates one in the repo: https://github.com/gcanti/fp-ts/blob/260ab3a720bed237fef2d2c18761f71c3a1523b7/examples/TaskEither.ts |
Ok so, this fp-ts version is necessarily less smart than the previous one when it comes to transform a In this case // add this to the `TaskEither` file
import { Curried2 } from 'fp-ts/lib/function'
declare module 'fp-ts/lib/Apply' {
interface Ops {
liftA2<A, B, C>(
apply: Apply<URI>, // <= important: this is the URI of TaskEither
f: Curried2<A, B, C>
): <L>(fa: TaskEither<L, A>, fb: TaskEither<L, B>) => TaskEither<L, C>
}
} In practice by doing that we provide a proof to the compiler that it can trasform a |
@gcanti Amazing, thank you. Good to understand why that is necessary. Can we add this to the example |
btw this is the reason why you can find a file named |
Hey @gcanti, I'm upgrading to fp-ts 0.4.0 and I ran into this issue with
TaskEither
. See the error in the code.Do you have any ideas what's going on here?
The text was updated successfully, but these errors were encountered: