X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcTyDecls.lhs;h=45984b74aac347fd8c1c2db163f70adfcb5d3a02;hb=cfcebde74cf826af12143a92bcffa8c995eee135;hp=282b30ecdb498ead775bb348a70d752758aede09;hpb=7dd11ebc4d4d091edc0f5e3c13f041b99961c136;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcTyDecls.lhs b/ghc/compiler/typecheck/TcTyDecls.lhs index 282b30e..45984b7 100644 --- a/ghc/compiler/typecheck/TcTyDecls.lhs +++ b/ghc/compiler/typecheck/TcTyDecls.lhs @@ -303,18 +303,7 @@ mkRecordSelector tycon fields@((first_con, first_field_label) : other_fields) -- Check that all the fields in the group have the same type -- This check assumes that all the constructors of a given -- data type use the same type variables - = (if null other_fields then (\x->x) else - let lbls = [fieldLabelName f | (_,f) <- fields] - uniqs = [nameUnique l | l <- lbls] - - in - pprTrace "mkRecordSelector" (vcat [ppr fields, - ppr lbls, - ppr uniqs, - hsep [text (show (field_name `compare` fieldLabelName f)) | (_,f) <- fields] - ])) - - checkTc (all (== field_ty) other_tys) + = checkTc (all (== field_ty) other_tys) (fieldTypeMisMatch field_name) `thenTc_` returnTc selector_id where