X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdriver%2Fghc-iface.lprl;fp=ghc%2Fdriver%2Fghc-iface.lprl;h=71b5d3c94362e1b559d389bb570ff9c1226c6ecf;hb=ed974e41e3dd1acd24e2ef816b104ff66ea720ee;hp=f14e6dc2cde7a10674c5437519b1e0768a490a72;hpb=3e47ab23427135cef00e718ae10f2b6338c4ae64;p=ghc-hetmet.git diff --git a/ghc/driver/ghc-iface.lprl b/ghc/driver/ghc-iface.lprl index f14e6dc..71b5d3c 100644 --- a/ghc/driver/ghc-iface.lprl +++ b/ghc/driver/ghc-iface.lprl @@ -158,6 +158,8 @@ sub constructNewHiFile { print NEWHI $Stuff{'new:usages'} unless $Stuff{'new:usages'} eq ''; print NEWHI $Stuff{'new:instances'} unless $Stuff{'new:instances'} eq ''; + print STDERR @decl_names ; + foreach $v (@decl_names) { &printNewItemVersion(NEWHI, $v, $new_module_version, $show_hi_diffs); # Print new version number print NEWHI $Decl{"new:$v"}; # Print the new decl itself @@ -254,8 +256,11 @@ sub readHiFile { $Decl{"$mod:$current_name"} = $_; if ($mod eq "old") { $OldVersion{$current_name} = $version; } - } elsif ( /^(newtype|data)\s+(.*\s+=>\s+)?(\S+)\s+/ ) { + } elsif ( /^(newtype|data)\s+({.*}\s+=>\s+)?(\S+)\s+/ ) { # Data declaration + # The (...)? parts skips over the context of a data decl + # to find the name of the type constructor. The curly + # brackets are part of the iface file syntax for contexts $current_name = "data $3"; $Decl{"$mod:$current_name"} = $_; if ($mod eq "old") { $OldVersion{$current_name} = $version; }