-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
add type-level dictionaries in order to reduce the number of overload… #155
Conversation
The typechecker already reports a bug with the codebase I think (proof that it's needed? 😉). It complains that State<S, A> is not conform to HKT2<L, A>, because State uses |
This is great, good catch!
|
Can you try something for me? In VSCode, press F1, type in "typescript", click "TypeScript: Select TypeScript Version" and click "Use Workspace Version". See if that fixes it in your VSCode. If it does, then that means Travis is using the incorrect version of TypeScript? |
I can confirm that there are weird random errors popping up. |
This one doesn't seem to give me the same issues, but I'm worried any attempt to typecheck the map will run into file ordering issues, which I assume is what's causing these heisenbugs
It's not a good idea to have a linter check frankencode like that anyway. Liable to break in the future if you do.
This one doesn't seem to give me the same issues, but I'm worried any attempt to typecheck the map will run into file ordering issues, which I assume is what's causing these heisenbugs Linting My bad, didn't realize linting was on, I'll check in the future Disable linting for map checker It's not a good idea to have a linter check frankencode like that anyway. Liable to break in the future if you do.
…rloadings-destroyer
Sorry for the linting commits, I figured out how to run the linter now (didn't know there was one). It seemed to have done a weird nonsensical merge too. If it bothers you, I'll do a rebase at the end? |
With the current method, you can't actually assign anything to the interface HKT<U, A> it seems, which might be bad. Then again, there really is no reason to have a HKT<U, A> anywhere in the code, as it's possible to convert to a concrete at compile time, so maybe this behavior is desirable. |
Doesn’t work with ts 2.4.1. I must figure out what’s wrong or find another solution
@SimonMeskens no problem. It seems that this last version doesn't check wrong HKT2 phantom types anymore though |
Yup, it currently strips out the check when compiling, but we could export the check, so that doesn't happen. |
I mean that if I change |
Fixed |
1944f10
to
39a0d83
Compare
This branch also builds with [email protected] without any change. @SimonMeskens if it's ok for you I'm going to merge this and publish a |
I tried further reducing overloads, but I can't really find a way, so yeah, merge away |
…ings