Refactor coercion holes
In fixing Trac #14584 I found that it would be /much/ more convenient if a "hole" in a coercion (much like a unification variable in a type) acutally had a CoVar associated with it rather than just a Unique. Then I can ask what the free variables of a coercion is, and get a set of CoVars including those as-yet-un-filled in holes. Once that is done, it makes no sense to stuff coercion holes inside UnivCo. They were there before so we could know the kind and role of a "hole" coercion, but once there is a CoVar we can get that info from the CoVar. So I removed HoleProv from UnivCoProvenance and added HoleCo to Coercion. In summary: * Add HoleCo to Coercion and remove HoleProv from UnivCoProvanance * Similarly in IfaceCoercion * Make CoercionHole have a CoVar in it, not a Unique * Make tyCoVarsOfCo return the free coercion-hole variables as well as the ordinary free CoVars. Similarly, remember to zonk the CoVar in a CoercionHole We could go further, and remove CoercionHole as a distinct type altogther, just collapsing it into HoleCo. But I have not done that yet. (cherry picked from commit a492af06)
Showing
- compiler/backpack/RnModIface.hs 1 addition, 0 deletionscompiler/backpack/RnModIface.hs
- compiler/coreSyn/CoreFVs.hs 1 addition, 1 deletioncompiler/coreSyn/CoreFVs.hs
- compiler/coreSyn/CoreLint.hs 5 additions, 2 deletionscompiler/coreSyn/CoreLint.hs
- compiler/iface/IfaceSyn.hs 2 additions, 3 deletionscompiler/iface/IfaceSyn.hs
- compiler/iface/IfaceType.hs 25 additions, 31 deletionscompiler/iface/IfaceType.hs
- compiler/iface/TcIface.hs 2 additions, 3 deletionscompiler/iface/TcIface.hs
- compiler/iface/ToIface.hs 3 additions, 2 deletionscompiler/iface/ToIface.hs
- compiler/typecheck/TcCanonical.hs 1 addition, 1 deletioncompiler/typecheck/TcCanonical.hs
- compiler/typecheck/TcEnv.hs 11 additions, 5 deletionscompiler/typecheck/TcEnv.hs
- compiler/typecheck/TcErrors.hs 3 additions, 3 deletionscompiler/typecheck/TcErrors.hs
- compiler/typecheck/TcHsSyn.hs 13 additions, 17 deletionscompiler/typecheck/TcHsSyn.hs
- compiler/typecheck/TcInteract.hs 3 additions, 3 deletionscompiler/typecheck/TcInteract.hs
- compiler/typecheck/TcMType.hs 42 additions, 33 deletionscompiler/typecheck/TcMType.hs
- compiler/typecheck/TcPluginM.hs 2 additions, 2 deletionscompiler/typecheck/TcPluginM.hs
- compiler/typecheck/TcRnTypes.hs 15 additions, 10 deletionscompiler/typecheck/TcRnTypes.hs
- compiler/typecheck/TcSMonad.hs 2 additions, 2 deletionscompiler/typecheck/TcSMonad.hs
- compiler/typecheck/TcTyDecls.hs 1 addition, 1 deletioncompiler/typecheck/TcTyDecls.hs
- compiler/typecheck/TcType.hs 7 additions, 7 deletionscompiler/typecheck/TcType.hs
- compiler/typecheck/TcUnify.hs 12 additions, 7 deletionscompiler/typecheck/TcUnify.hs
- compiler/typecheck/TcValidity.hs 2 additions, 2 deletionscompiler/typecheck/TcValidity.hs
Loading
Please register or sign in to comment