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);
# 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");
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;
$_ = $2;
}
- if ( /^(\S+)\s+::\s+/ ) {
+ if ( /^(\S+)\s+_:_\s+/ ) {
$current_name = $1;
$Decl{"$mod:$current_name"} = $_;
if ($mod eq "old") { $OldVersion{$current_name} = $version; }
$Decl{"$mod:$current_name"} .= $_
}
+ } elsif ( /^--.*/ ) { # silently ignore comment lines.
+ ;
} else {
print STDERR "$Pgm:junk old iface line?:section:$now_in:$_";
}