X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnTypes.lhs;h=1e03afd5a383bba6f30d3c10acdb3ceb26471b3a;hb=d8f6f78cd8342fcfcb4a2789d7f9629123778f54;hp=4138c00a187ee1ab84b5f3f2dfe2ce4350201563;hpb=5822cb8d13aa3c05d2b46b4510c13d94b902eb21;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs index 4138c00..1e03afd 100644 --- a/compiler/typecheck/TcRnTypes.lhs +++ b/compiler/typecheck/TcRnTypes.lhs @@ -3,6 +3,13 @@ % (c) The GRASP Project, Glasgow University, 1992-2002 % \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module TcRnTypes( TcRnIf, TcRn, TcM, RnM, IfM, IfL, IfG, -- The monad is opaque outside this module TcRef, @@ -463,7 +470,7 @@ data RefinementVisibility -- GADT refinement instance Outputable TcTyThing where -- Debugging only - ppr (AGlobal g) = ppr g + ppr (AGlobal g) = pprTyThing g ppr elt@(ATcId {}) = text "Identifier" <> ifPprDebug (brackets (ppr (tct_id elt) <> dcolon <> ppr (tct_type elt) <> comma <+> ppr (tct_level elt) <+> ppr (tct_co elt))) @@ -628,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 {