From: simonm Date: Fri, 7 May 1999 11:31:12 +0000 (+0000) Subject: [project @ 1999-05-07 11:31:12 by simonm] X-Git-Tag: Approximately_9120_patches~6247 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=435c21ed6a0f4be11e4e94055fc4b8bc3deff08f;p=ghc-hetmet.git [project @ 1999-05-07 11:31:12 by simonm] Don't try to make a tag2con function if we're deriving Ix on a single-constructor datatype (it isn't needed, and will probably be type-incorrect anyway). --- diff --git a/ghc/compiler/typecheck/TcDeriv.lhs b/ghc/compiler/typecheck/TcDeriv.lhs index 9e9a79a..fa51901 100644 --- a/ghc/compiler/typecheck/TcDeriv.lhs +++ b/ghc/compiler/typecheck/TcDeriv.lhs @@ -670,7 +670,8 @@ gen_taggery_Names inst_infos do_tag2con acc_Names tycon | isDataTyCon tycon && (we_are_deriving enumClassKey tycon || - we_are_deriving ixClassKey tycon) + we_are_deriving ixClassKey tycon + && isEnumerationTyCon tycon) = returnTc ( (tag2con_RDR tycon, tycon, GenTag2Con) : (maxtag_RDR tycon, tycon, GenMaxTag) : acc_Names)