X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcDeriv.lhs;h=5d2b829276c375398450b58c9a8f17d867e788a0;hb=0884a2cb09cd5f609b6163a225ca3b8cce942250;hp=3466cbfab1e9df61aa0bfe28f4af51fe0e9ecc4d;hpb=895eccb09f195beefeba9d3c59d7dfa557c6f7d1;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index 3466cbf..5d2b829 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -440,8 +440,7 @@ deriveStandalone (L loc (DerivDecl deriv_ty)) <+> text "tvs:" <+> ppr tvs <+> text "theta:" <+> ppr theta <+> text "tau:" <+> ppr tau) - ; (cls, inst_tys) <- checkValidInstHead tau - ; checkValidInstance tvs theta cls inst_tys + ; (cls, inst_tys) <- checkValidInstance deriv_ty tvs theta tau -- C.f. TcInstDcls.tcLocalInstDecl1 ; let cls_tys = take (length inst_tys - 1) inst_tys