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

HList.cons() static factory method doesn't infer tail type #2

Open
jnape opened this issue Sep 24, 2016 · 4 comments
Open

HList.cons() static factory method doesn't infer tail type #2

jnape opened this issue Sep 24, 2016 · 4 comments

Comments

@jnape
Copy link
Member

jnape commented Sep 24, 2016

HList.cons should be parametrized to take advantage of Generalized Target Type Inference, making the following expression infer the resulting HList type from right-hand argument:

SingletonHList<Integer> cons = HList.cons(1, HList.nil());
Tuple2<String, Integer> cons = HList.cons("foo", HList.cons(1, HList.nil()));
// ... and so on for other tuple specializations

Unfortunately, after adding this behavior, compile time was observed to have exponentially increased to over 15 seconds thanks to JDK-8055984, so this behavior shouldn't be added back until it's fixed (targeted for Java 1.9).

@jnape
Copy link
Member Author

jnape commented Nov 19, 2017

This should be attempted again when addressing #15

@jnape jnape added this to the 2.0.1 milestone Nov 30, 2017
@jnape jnape removed this from the 2.0.1 milestone Jan 15, 2018
@jnape
Copy link
Member Author

jnape commented Feb 25, 2018

Apparently HListLens#3-HListLens8 are completely out of the equation as well, since proving the lens laws just for _3 blows up the javac stack under ~1G and then takes God knows how long to compile (I killed it after 10 minutes).

I am Jack's complete lack of surprise.

@jnape jnape added this to the 4.0.0 milestone May 20, 2018
@jnape
Copy link
Member Author

jnape commented Jan 28, 2019

After Java12 comes out, I may make Java10 the required JDK version to target to use lambda, at which point, I can add this functionality back.

@jnape
Copy link
Member Author

jnape commented May 19, 2019

Pushing this until version 5, at which point Java 11 will be the target JDK, with anything before it considered a secondary priority

@jnape jnape removed this from the 4.0.0 milestone May 19, 2019
@jnape jnape mentioned this issue Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant