Computing imp_finst can take up significant amount of time
I profiled a build of a production code base with thousands of modules and merging
imp_finsts  from different imports came up on top taking up 9% of total compile time.
I made a synthetic test case to reproduce the issue (see attached
The test case is basically multiple layers of modules where each module defines a type family instance through deriving Generic.
The problem is quite obvious,
unionLists is quadratic and
imp_finsts just keeps growing with the size of the code base.
|Component||Compiler (Type checker)|