-
Notifications
You must be signed in to change notification settings - Fork 28
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
sequenceS and sequenceT from fp-ts Apply gives type errors #49
Comments
Looks like smth in fp-ts changed... I have no error in remote-data master branch, but I do have this error in fp-ts master branch. Need to investigate, thanks for the report! |
Side project: |
That's interesting. The project where I discovered this problem is still on |
@larskinn could you check |
It does not seem like that's the case.
|
Yeah, looks so, I also have a single version installed. import { Apply2 } from 'fp-ts/lib/Apply';
import { remoteData, URI } from '@devexperts/remote-data-ts';
const tmp: Apply2<URI> = remoteData;
// ^-- error! Usually it's because of 2 versions of fp-ts installed (2 different dictionaries) but it's not the case now. import { RemoteData } from '@devexperts/remote-data-ts';
declare module 'fp-ts/lib/HKT' {
interface URItoKind2<E, A> {
readonly [URI]: RemoteData<E, A>;
}
} This may be used as a temporary quickfix. |
I actually don't get this error, tried with |
@raveclassic not sure what's going on, I encountered this weird thing once but I coundn't repro |
@raveclassic re: the URI error, here's another codesandbox, and I can't reproduce it. As mentioned I tried with different fp-ts versions. I'm far out of my depth re: the actual type class implementations, so I can't be much help there. But let me know if there's anything else I can do to narrow down the issue. |
I was trying to add this to my local branch, and it did not fix the problem. But while trying it out in the codesandbox mentioned above, I discovered this interesting fact: If I import I also see that Is it possible that for instance |
The initial reported problem with |
I'm not sure if this is an upstream bug in fp-ts, or if something is wrong with the implementation here.
I would expect
sequenceS
andsequenceT
to work like they do forEither
, but instead I get type errors.The full error in both cases is:
Here is a more elaborate codesandbox demonstrating the problem:
The text was updated successfully, but these errors were encountered: