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

Interoperability between several copies of fp-ts #874

Closed
cyberixae opened this issue May 20, 2019 · 9 comments
Closed

Interoperability between several copies of fp-ts #874

cyberixae opened this issue May 20, 2019 · 9 comments

Comments

@cyberixae
Copy link
Sponsor Contributor

I'm trying to work with a library that imports fp-ts and exports a function with an Either<string, string> return value. However, an attempt to store the return value in variable with Either<string, string> type causes the compiler to run out of memory. I can get the code to compile by replacing the library Either with local Either by doing libraryCall(...args).fold(left, right), however this makes the code confusing since one would expect the two Either types to be compatible since they both originate from fp-ts.

@leemhenson
Copy link
Contributor

It's this issue:

microsoft/TypeScript#30429

The v2 branches coming soon don't exhibit the issue because there are no classes for it to choke on comparing.

@leemhenson
Copy link
Contributor

microsoft/TypeScript#31541

excited

@cyberixae
Copy link
Sponsor Contributor Author

What is the first TypeScript version number where this should work?

@cyberixae
Copy link
Sponsor Contributor Author

Version 3.5.0-dev.20190525 seems to still have the problem :-/

@cyberixae
Copy link
Sponsor Contributor Author

Never mind. Seems to work after all.

@cyberixae
Copy link
Sponsor Contributor Author

Actually, The problem still happens when you use npm link to link two packages.

@cyberixae cyberixae reopened this May 27, 2019
@cyberixae
Copy link
Sponsor Contributor Author

I added a comment on microsoft/TypeScript#30429

@cyberixae
Copy link
Sponsor Contributor Author

This problem might not exist at all in fp-ts 2.

@grossbart
Copy link
Sponsor Collaborator

I did encounter this problem several times in fp-ts v1, but haven't seen it since v2. Which makes sense, because that was one of many reasons for moving away from the previous class-based approach. Closing this issue now, should it turn out to still be an issue, feel free to reopen.

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