[project @ 1997-03-14 07:52:06 by simonpj]
[ghc-hetmet.git] / ghc / driver / ghc-iface.lprl
index 4fa4b8a..5f606fb 100644 (file)
@@ -24,8 +24,8 @@ sub postprocessHiFile {
     local($new_hi) = "$Tmp_prefix.hi-new";
     local($show_hi_diffs) = $HiDiff_flag && ! $HiOnStdout && ! $going_interactive && -f $hifile_target;
 
-#    print STDERR "*** New hi file follows...\n";
-#    print STDERR `$Cat $hsc_hi`;
+    print STDERR "*** New hi file follows...\n" if $Verbose;
+    system("$Cat $hsc_hi 1>&2") if $Verbose;
 
     &constructNewHiFile($hsc_hi, $hifile_target, $new_hi, $show_hi_diffs);
 
@@ -51,7 +51,7 @@ sub postprocessHiFile {
     # if we produced an interface file "no matter what",
     # print what we got on stderr (ToDo: honor -ohi flag)
     if ( $HiOnStdout ) {
-       print STDERR `$Cat $new_hi`;
+        system("$Cat $new_hi 1>&2") if $Verbose;
     } else {
        &run_something("$Cmp -s $hifile_target $new_hi || ( $Rm $hifile_target && $Cp $new_hi $hifile_target )",
           "Replace .$HiSuffix file, if changed");
@@ -171,7 +171,7 @@ sub readHiFile {
        next if /\{-# GHC_PRAGMA INTERFACE VERSION 20 #-\}/;
 
        # avoid pre-1.3 interfaces
-#print STDERR "now_in:$now_in:$_";
+        #print STDERR "now_in:$now_in:$_";
        if ( /\{-# GHC_PRAGMA INTERFACE VERSION . #-\}/ ) {
            $HiExists{$mod} = 0;
            last hi_line;
@@ -208,7 +208,7 @@ sub readHiFile {
                $_ = $2;
           }
        
-           if ( /^(\S+)\s+::\s+/ ) {
+           if ( /^(\S+)\s+_:_\s+/ ) {
                $current_name = $1;
                $Decl{"$mod:$current_name"} = $_;
                if ($mod eq "old") { $OldVersion{$current_name} = $version; }
@@ -238,6 +238,8 @@ sub readHiFile {
                $Decl{"$mod:$current_name"} .= $_
            }
 
+       } elsif ( /^--.*/ ) { # silently ignore comment lines.
+           ;
        } else {
            print STDERR "$Pgm:junk old iface line?:section:$now_in:$_";
        }