singletons icon indicating copy to clipboard operation
singletons copied to clipboard

Compile times with large sums

Open andrewthad opened this issue 8 years ago • 2 comments

I have a data type with around 80 data constructors and derived instances for Eq,Ord,Bounded, and Enum. With ghc-7.10 and singletons-2.1, this compiled in somewhere near 15 seconds. With GHC8 and singletons-2.2, it takes closer to 100 seconds. I'm not sure if this is more likely to be a singletons issue or a more general issue with GHC compile times, but I figured I would bring it up anyway. I've created a gist with a minimal example: https://gist.github.com/andrewthad/b3cb6aca69000ac342d4eee24c4e6eb1

Also, I'm a little surprised that it's able to compile without TypeInType being enabled explicitly, but I guess none of the generated code needs it.

andrewthad avatar Oct 31 '16 13:10 andrewthad

Yes, this looks like GHC's fault. See #8095. There are many related tickets, e.g. #12506, #11598

jstolarek avatar Oct 31 '16 13:10 jstolarek

I just tested GHC 8 with singletons-2.1, and it's slow. So I'm with @jstolarek on this one. Will keep ticket open, though, so that when GHC fixes its end, we can test.

goldfirere avatar Oct 31 '16 15:10 goldfirere