Hacker News new | past | comments | ask | show | jobs | submit login

The fact that x1 is \y -> (y, y) is superficial, though. Something like x1 = Just also increases exponentially, and makes clear that using a deduplicated DAG for representing type terms doesn't solve this.



With x1 = Just, the program is accepted instantly by ghc. I think you need a type variable to appear twice.


Ah, it's still exponential, but in the size of the type, and the constants of the complexity are a bit different, so you need around x30.


Ah, you're right. If one goes to x_{i+1}, then there will be 2^i Maybes in the type. The number of Maybe-occurrences in the type doubles in each step and sharing won't help there.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: