X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnTypes.lhs;h=ec2f5da7d0bb2c362e2befe40a1fc9367fe0516b;hp=66d6a693f31209742ff931a67994bb857872d8d6;hb=4ba96c06f2b69ea1fe2b27718013713e94c1520c;hpb=0bca9b76899d5baab892d26d6054db5b7189392c;ds=sidebyside diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs index 66d6a69..ec2f5da 100644 --- a/compiler/typecheck/TcRnTypes.lhs +++ b/compiler/typecheck/TcRnTypes.lhs @@ -635,6 +635,17 @@ In addition to the basic Haskell variants of 'Inst's, they can now also represent implication constraints 'forall tvs. (reft, given) => wanted' and equality constraints 'co :: ty1 ~ ty2'. +NB: Equalities occur in two flavours: + + (1) Dict {tci_pred = EqPred ty1 ty2} + (2) EqInst {tci_left = ty1, tci_right = ty2, tci_co = coe} + +The former arises from equalities in contexts, whereas the latter is used +whenever the type checker introduces an equality (e.g., during deferring +unification). + +I am not convinced that this duplication is necessary or useful! -=chak + \begin{code} data Inst = Dict {