Changes between Version 23 and Version 24 of FloatMoreEqs2018


Ignore:
Timestamp:
Nov 26, 2018 2:07:00 AM (13 months ago)
Author:
nfrisby
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FloatMoreEqs2018

    v23 v24  
    66
    77* We should not float {{{w :: alpha[L] ~ <RHS>}}} if the RHS contains a type family application that in turn contains a metavar of a level greater than L. To float {{{w}}}, we'd first promote all RHS metavars to level L. But since they are arguments of a type family, we should not promote them prematurely: it's possible the type family could later reduce in a way that ignores/eliminates those metavars.
     8  * (TODO I don't think the [https://github.com/ghc/ghc/blob/ghc-8.6/compiler/typecheck/TcSimplify.hs#L2200 existing GHC code] checks for this. Should it?)
    89* The {{{inert_eqs}}} field of the GHC internal data structure contains the {{{CTyEqCan}}} constraints of an inert set. That's where we'd find the candidates for floating and it's also where we'd find the given equalities we'd need to check. There are other fields of that data structure that we'd require to not have any givens, before floating anything.
    910* I'd summarize the idea as "We can float an {{{CTyEqCan}}} constraint from level K if: