From 91e76ef3bcf4161b52ea789e4e82bb98b894a53b Mon Sep 17 00:00:00 2001 From: sof Date: Mon, 25 Aug 1997 21:36:57 +0000 Subject: [PATCH] [project @ 1997-08-25 21:36:57 by sof] Added debugging code for dataConFieldLabels --- ghc/compiler/basicTypes/Id.lhs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ghc/compiler/basicTypes/Id.lhs b/ghc/compiler/basicTypes/Id.lhs index e1fd2a0..49c76cc 100644 --- a/ghc/compiler/basicTypes/Id.lhs +++ b/ghc/compiler/basicTypes/Id.lhs @@ -990,6 +990,23 @@ dataConRepType con dataConFieldLabels :: DataCon -> [FieldLabel] dataConFieldLabels (Id _ _ _ (AlgConId _ _ fields _ _ _ _ _ _) _ _) = fields dataConFieldLabels (Id _ _ _ (TupleConId _) _ _) = [] +#ifdef DEBUG +dataConFieldLabels x@(Id _ _ _ idt _ _) = + panic ("dataConFieldLabel: " ++ + (case idt of + LocalId _ -> "l" + SysLocalId _ -> "sl" + PrimitiveId _ -> "p" + SpecPragmaId _ _ -> "sp" + ImportedId -> "i" + RecordSelId _ -> "r" + SuperDictSelId _ _ -> "sc" + MethodSelId _ -> "m" + DefaultMethodId _ -> "d" + DictFunId _ _ -> "di" + InstId _ -> "in" + SpecId _ _ _ -> "spec")) +#endif dataConStrictMarks :: DataCon -> [StrictnessMark] dataConStrictMarks (Id _ _ _ (AlgConId _ stricts _ _ _ _ _ _ _) _ _) = stricts -- 1.7.10.4