From ef0ef4cc41c978c8adda6fb840258f294d72dc87 Mon Sep 17 00:00:00 2001 From: Manuel M T Chakravarty Date: Fri, 8 Jun 2007 06:10:46 +0000 Subject: [PATCH] Fix worker/wrapper ids for newtype instances - mkDataConIds forced an algebraic worker/wrapper on newtype instances (not on vanilla newtypes). I am not sure where this came from (from code I wrote or from the recent restructuring of MkIds), but its not the right thing to do. In particular, it requires newtype instances to have con_info labels in the generated code, which makes no sense. - Worker construction for newtypes is smart enough that it will construct the right signature for newtype instances (ie, one that mentions the family type constructor, not the instance tycon). --- compiler/basicTypes/MkId.lhs | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/basicTypes/MkId.lhs b/compiler/basicTypes/MkId.lhs index 403d309..535faef 100644 --- a/compiler/basicTypes/MkId.lhs +++ b/compiler/basicTypes/MkId.lhs @@ -211,7 +211,6 @@ Now we want mkDataConIds :: Name -> Name -> DataCon -> DataConIds mkDataConIds wrap_name wkr_name data_con | isNewTyCon tycon -- Newtype, only has a worker - , not (isFamInstTyCon tycon) -- unless it's a family instancex = DCIds Nothing nt_work_id | any isMarkedStrict all_strict_marks -- Algebraic, needs wrapper -- 1.7.10.4