diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-03-19 10:28:01 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-07 18:36:49 -0400 |
commit | 255418da5d264fb2758bc70925adb2094f34adc3 (patch) | |
tree | 39e3d7f84571e750f2a087c1bc2ab87198e9b147 /compiler/flattening-notes | |
parent | 3d2991f8b4c1b686323b2c9452ce845a60b8d94c (diff) | |
download | haskell-255418da5d264fb2758bc70925adb2094f34adc3.tar.gz |
Modules: type-checker (#13009)
Update Haddock submodule
Diffstat (limited to 'compiler/flattening-notes')
-rw-r--r-- | compiler/flattening-notes | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/compiler/flattening-notes b/compiler/flattening-notes new file mode 100644 index 0000000000..2aa9243743 --- /dev/null +++ b/compiler/flattening-notes @@ -0,0 +1,32 @@ +ToDo: + +* inert_funeqs, inert_eqs: keep only the CtEvidence. + They are all CFunEqCans, CTyEqCans + +* Consider individual data types for CFunEqCan etc + +* Collapse CNonCanonical and CIrredCan + * RAE: I think it would be better to split off CNonCanonical into its own + type, and remove it completely from Ct. Then, we would keep CIrredCan + +The coercion solver +~~~~~~~~~~~~~~~~~~~~ +Our hope. In GHC currently drawn from {G,W,D}, but with the coercion +solver the flavours become pairs + { (k,l) | k <- {G,W,D}, l <- {Nom,Rep} } + +But can + a -(G,R)-> Int +rewrite + b -(G,R)-> T a +? + +Well, it depends on the roles at which T uses its arguments :-(. +So it may not be enough just to look at (flavour,role) pairs? + +RAE: This is true, but it is taken care of by being careful in the +flattening algorithm. Flattening (T a) looks at the roles of +T's parameters, and chooses the role for flattening `a` appropriately. +This is why there must be the [Role] parameter to flattenMany. +Of course, this non-uniform rewriting may gum up the proof works. + |