X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdriver%2Fghc-iface.lprl;h=5f606fb5af98da3d07b58d83b4e199676328c527;hb=1fb1ab5d53a09607e7f6d2450806760688396387;hp=4fa4b8a3686773eb6d05d627b4618f44fcf818e6;hpb=8de16184643ea3c2f9f30b5eaed18db6ef247760;p=ghc-hetmet.git diff --git a/ghc/driver/ghc-iface.lprl b/ghc/driver/ghc-iface.lprl index 4fa4b8a..5f606fb 100644 --- a/ghc/driver/ghc-iface.lprl +++ b/ghc/driver/ghc-iface.lprl @@ -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:$_"; }