From 435c21ed6a0f4be11e4e94055fc4b8bc3deff08f Mon Sep 17 00:00:00 2001 From: simonm Date: Fri, 7 May 1999 11:31:12 +0000 Subject: [PATCH] [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). --- ghc/compiler/typecheck/TcDeriv.lhs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 1.7.10.4