[project @ 1997-05-26 06:18:26 by sof]
authorsof <unknown>
Mon, 26 May 1997 06:18:26 +0000 (06:18 +0000)
committersof <unknown>
Mon, 26 May 1997 06:18:26 +0000 (06:18 +0000)
Dump .hi on stdout when -hi is set; fix for class regexps

ghc/driver/ghc-iface.lprl

index d5020ed..aafcdaf 100644 (file)
@@ -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"} .= $_
            }