mlsub icon indicating copy to clipboard operation
mlsub copied to clipboard

Type exponentially more complex than necessary

Open AshleyYakeley opened this issue 7 years ago • 1 comments

In the demo, I tried let rec x = {f1=x} and got x : ({f1 : rec a = ({f1 : a})}). This seems correct, but wouldn't x : rec a = {f1 : a} be simpler?

I also tried let rec x = {f1=x;f2=x;f3=x;f4=x;f5=x;f6=x;f7=x} and got a huge type expression, apparently exponential in the number of fields. I think this is just x : rec a = {f1 : a, f2 : a, f3 : a, f4 : a, f5 : a, f6 : a, f7 : a}?

AshleyYakeley avatar May 19 '18 22:05 AshleyYakeley

This has actually been fixed for a while, but I never got around to updating the version on the website.

stedolan avatar May 20 '18 16:05 stedolan