diff --git a/ghc/driver/ghc-iface.lprl b/ghc/driver/ghc-iface.lprl
index aafcdafc2bc87530c84de6de51b1b3fc15d98f27..8144c8a66fa70b65ccb32bbc93bcb6f318a951f2 100644
--- a/ghc/driver/ghc-iface.lprl
+++ b/ghc/driver/ghc-iface.lprl
@@ -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; }