X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypes%2FType.lhs;h=cd484f4f46ae5b6031f9ed63a470de5bceaa5f98;hp=c1e05447ec14b5436c22ca2f73178c7b5b41cd39;hb=6d2b0ae3ae3296cb6cdd496cbf85b897c7ce150b;hpb=bbd67a5f4f3515ea5c37711815b2f6ad58cbd655 diff --git a/compiler/types/Type.lhs b/compiler/types/Type.lhs index c1e0544..cd484f4 100644 --- a/compiler/types/Type.lhs +++ b/compiler/types/Type.lhs @@ -1004,9 +1004,11 @@ about binders, as we are only interested in syntactic subterms.) \begin{code} tcPartOfType :: Type -> Type -> Bool -tcPartOfType t1 t2 = tcEqType t1 t2 +tcPartOfType t1 t2 + | tcEqType t1 t2 = True tcPartOfType t1 t2 | Just t2' <- tcView t2 = tcPartOfType t1 t2' +tcPartOfType _ (TyVarTy _) = False tcPartOfType t1 (ForAllTy _ t2) = tcPartOfType t1 t2 tcPartOfType t1 (AppTy s2 t2) = tcPartOfType t1 s2 || tcPartOfType t1 t2 tcPartOfType t1 (FunTy s2 t2) = tcPartOfType t1 s2 || tcPartOfType t1 t2