• eir@cis.upenn.edu's avatar
    Performance enhancements in TcFlatten. · 922168fd
    eir@cis.upenn.edu authored
    This commit fixes some performance regressions introduced by 0cc47eb9,
    adding more `Coercible` magic to the solver. See Note
    [flatten_many performance] in TcFlatten for more info.
    
    The improvements do not quite restore the old numbers. Given that
    the solver is really more involved now, I am accepting this regression.
    
    The way forward (I believe) would be to have *two* flatteners: one
    that deals only with nominal equalities and thus never checks roles,
    and the more general one. A nice design of keeping this performant
    without duplicating code eludes me, but someone else is welcome
    to take a stab.
    922168fd
MonadUtils.hs 5.87 KB