From a7c9eb860b148e93593cf01b39ea6a3d9af1f01b Mon Sep 17 00:00:00 2001 From: sewardj Date: Thu, 6 Jan 2000 14:17:16 +0000 Subject: [PATCH] [project @ 2000-01-06 14:17:16 by sewardj] Reinstate debug printing, but only only for combined mode. --- ghc/interpreter/interface.c | 55 ++++++------------------------------------- 1 file changed, 7 insertions(+), 48 deletions(-) diff --git a/ghc/interpreter/interface.c b/ghc/interpreter/interface.c index 59843bd..1ba7fc4 100644 --- a/ghc/interpreter/interface.c +++ b/ghc/interpreter/interface.c @@ -7,8 +7,8 @@ * Hugs version 1.4, December 1997 * * $RCSfile: interface.c,v $ - * $Revision: 1.18 $ - * $Date: 2000/01/05 19:10:21 $ + * $Revision: 1.19 $ + * $Date: 2000/01/06 14:17:16 $ * ------------------------------------------------------------------------*/ #include "prelude.h" @@ -478,41 +478,6 @@ Bool ifentityAllTypesKnown ( Cell entity, ZPair aktys_mod ) } -#if 0 -I hope this can be nuked. -/* Kludge. Stuff imported from PrelGHC isn't referred to in a - qualified way, so arrange it so it is. -*/ -QualId magicRequalify ( ConId id ) -{ - Text tid; - Text tmid; - assert(isCon(id)); - tid = textOf(id); - - fprintf ( stderr, "$--$--$--$--$--$ magicRequalify: %s", - textToStr(tid) ); - - if (tid == findText("[]")) { - tmid = findText("PrelList"); - } else - if (tid == findText("Ratio")) { - tmid = findText("PrelNum"); - } else - if (tid == findText("Char")) { - tmid = findText("PrelGHC"); - } else { - fprintf(stderr, "??? \n"); - return id; - } - - fprintf ( stderr, " -> %s.%s\n", - textToStr(tmid), textToStr(tid) ); - return mkQualId ( mkCon(tmid), id ); -} -#endif - - /* ifTypeDoesntRefUnknownTycon :: I_IMPORT..I_VALUE -> (([QualId], ConId)) -> Bool */ /* mod is the current module being processed -- so we can qualify unqual'd names. Strange calling convention for aktys and mod is so we can call this @@ -590,11 +555,12 @@ Void processInterfaces ( void ) List ifaces = NIL; /* :: List I_INTERFACE */ List iface_sizes = NIL; /* :: List Int */ List iface_onames = NIL; /* :: List Text */ -#if 0 + + if (isNull(ifaces_outstanding)) return; + fprintf ( stderr, "processInterfaces: %d interfaces to process\n", length(ifaces_outstanding) ); -#endif /* unzip3 ifaces_outstanding into ifaces, iface_sizes, iface_onames */ for (xs = ifaces_outstanding; nonNull(xs); xs=tl(xs)) { @@ -630,9 +596,7 @@ Void processInterfaces ( void ) /* Have we reached a fixed point? */ i = length(all_known_types); -#if 0 printf ( "\n============= %d known types =============\n", i ); -#endif if (num_known_types == i) break; num_known_types = i; @@ -745,7 +709,7 @@ fprintf(stderr, "abstractify newtype %s\n", textToStr(textOf(getIEntityName(ent) be value defns, classes and instances which refer to unknown types. Delete iteratively until a fixed point is reached. */ -printf("\n"); + printf("\n"); num_known_types = 999999999; while (TRUE) { @@ -762,9 +726,7 @@ printf("\n"); /* Have we reached a fixed point? */ i = length(all_known_types); -#if 0 printf ( "\n------------- %d known types -------------\n", i ); -#endif if (num_known_types == i) break; num_known_types = i; @@ -871,11 +833,9 @@ printf("\n"); } } } -#if 0 fprintf(stderr, "\n=========================================================\n"); fprintf(stderr, "=========================================================\n"); -#endif /* Traverse again the decl lists of the modules, this time calling the finishGHC* functions. But don't process @@ -936,10 +896,9 @@ printf("\n"); } } } -#if 0 fprintf(stderr, "\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); fprintf(stderr, "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); -#endif + /* Build the module(m).export lists for each module, by running through the export lists in the iface. Also, do the implicit 'import Prelude' thing. And finally, do the object code -- 1.7.10.4