From 61b361d587a91564dfec2f40fc67880f96724822 Mon Sep 17 00:00:00 2001 From: sof Date: Mon, 26 May 1997 06:18:26 +0000 Subject: [PATCH] [project @ 1997-05-26 06:18:26 by sof] Dump .hi on stdout when -hi is set; fix for class regexps --- ghc/driver/ghc-iface.lprl | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ghc/driver/ghc-iface.lprl b/ghc/driver/ghc-iface.lprl index d5020ed..aafcdaf 100644 --- a/ghc/driver/ghc-iface.lprl +++ b/ghc/driver/ghc-iface.lprl @@ -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 ) { - system("$Cat $new_hi 1>&2") if $Verbose; + 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"); @@ -223,17 +223,12 @@ sub readHiFile { $Decl{"$mod:$current_name"} = $_; if ($mod eq "old") { $OldVersion{$current_name} = $version; } - } elsif ( /class\s+(.*\s+=>\s+)?(\S+)\s+.*where\s+\{.*\};/ ) { + } elsif ( /^class\s+(.*\s+=>\s+)?(\S+)\s+.*where\s+\{.*\}/ ) { # must be wary of => bit matching after "where"... $current_name = $2; $Decl{"$mod:$current_name"} = $_; if ($mod eq "old") { $OldVersion{$current_name} = $version; } - } elsif ( /class\s+(.*\s+=>\s+)?(\S+)\s+/ ) { - $current_name = $2; - $Decl{"$mod:$current_name"} = $_; - if ($mod eq "old") { $OldVersion{$current_name} = $version; } - } else { # Continuation line $Decl{"$mod:$current_name"} .= $_ } -- 1.7.10.4