[project @ 1997-06-03 16:17:59 by sof]
authorsof <unknown>
Tue, 3 Jun 1997 16:17:59 +0000 (16:17 +0000)
committersof <unknown>
Tue, 3 Jun 1997 16:17:59 +0000 (16:17 +0000)
regexes for class fixed up

ghc/driver/ghc-iface.lprl

index aafcdaf..8144c8a 100644 (file)
@@ -223,8 +223,10 @@ 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+/ ) {
                # must be wary of => bit matching after "where"...
+               # ..hence the [^{}] part
+               # NB: a class decl may not have a where part at all
                $current_name = $2;
                $Decl{"$mod:$current_name"} = $_;
                if ($mod eq "old") { $OldVersion{$current_name} = $version; }