From e8e3d26451f769461d786d58ddf48fe2c3a687fd Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 20 Dec 2001 17:09:46 +0000 Subject: [PATCH] [project @ 2001-12-20 17:09:46 by simonpj] Comments --- ghc/compiler/types/Type.lhs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ghc/compiler/types/Type.lhs b/ghc/compiler/types/Type.lhs index 056316d..c561acb 100644 --- a/ghc/compiler/types/Type.lhs +++ b/ghc/compiler/types/Type.lhs @@ -958,6 +958,16 @@ seqPred (IParam n ty) = n `seq` seqType ty Comparison; don't use instances so that we know where it happens. Look through newtypes but not usage types. +Note that eqType can respond 'False' for partial applications of newtypes. +Consider + newtype Parser m a = MkParser (Foogle m a) + +Does + Monad (Parser m) `eqType` Monad (Foogle m) + +Well, yes, but eqType won't see that they are the same. +I don't think this is harmful, but it's soemthing to watch out for. + \begin{code} eqType t1 t2 = eq_ty emptyVarEnv t1 t2 eqKind = eqType -- No worries about looking -- 1.7.10.4