Closed sinelaw closed 9 years ago
No longer an issue - changed to use a graph (tree actually) rather than equivalence classes due to some correctness issues. Incidentally the fgl graphs use Patricia Trees (IntMap) internally so performance should be good too.
Currently InferState has:
varInstances :: Map.Map TVarName (Set.Set QualType)
It may be faster to use an int-based equivalence class implementation (maybe the package disjoint-set?) The problem is that the current implementation supports arbitrary types (for when a type variable in the equivalence has been substituted with a non-tvar type), and with an Int-based equivalence we'll need to add another layer of indirection.