I am working on a project where I represent large amounts of data at the type level using RowLists and noticed terrible (super-exponential) asymptotic compile time performance with respect the the number of elements in the list. It isn’t noticable for fewer than 8 elements, but takes ~30 minutes for a 15 element list.
Initially I thought it was an unavoidable issue with constraint solving, however after further experimentation I found that I could reproduce the slowdown with this following (invalid) program:
module Main where
t :: ( T ( T ( T ( T ( T ( T ( T ( T ( T ( T ( T ( T ( T ( T ( T ( T ( T )))))))))))))))))
This takes ~15 seconds on my laptop to get an error message.
(I have experience this behaviour on both versions 0.11.6 and 0.12.0)
I haven't yet investigated any further, but I'm guessing it's an issue with the parser/AST representation.
I've written a script that generates programs with increasingly nested types and plotted a graph displaying the results:

I would be happy to work on a fix, however I am very busy until the start of July.
I am working on a project where I represent large amounts of data at the type level using
RowLists and noticed terrible (super-exponential) asymptotic compile time performance with respect the the number of elements in the list. It isn’t noticable for fewer than 8 elements, but takes ~30 minutes for a 15 element list.Initially I thought it was an unavoidable issue with constraint solving, however after further experimentation I found that I could reproduce the slowdown with this following (invalid) program:
This takes ~15 seconds on my laptop to get an error message.
(I have experience this behaviour on both versions 0.11.6 and 0.12.0)
I haven't yet investigated any further, but I'm guessing it's an issue with the parser/AST representation.
I've written a script that generates programs with increasingly nested types and plotted a graph displaying the results:
I would be happy to work on a fix, however I am very busy until the start of July.