[add data/names.txt for a single place to list names that the compiler might use
John Meacham <john@repetae.net>**20070524223724] hunk ./Makefile 137
-Name/Prim.hs: utils/op_names.prl data/primitives.txt
+Name/Prim.hs: utils/op_names.prl data/primitives.txt data/names.txt
hunk ./Name/Names.hs 62
-dc_Cons = toName DataConstructor ("Jhc.Prim",":")
-dc_EmptyList = toName DataConstructor ("Jhc.Prim","[]")
-dc_Rational = toName DataConstructor ("Jhc.Num",":%")
-dc_Unit = toName DataConstructor ("Jhc.Basics","()")
-dc_Boolzh = toName DataConstructor ("Jhc.Order","Bool#")
-dc_Target = toName DataConstructor  ("Jhc.Options","Target#")
hunk ./Name/Names.hs 66
-tc_JumpPoint = toName TypeConstructor   ("Jhc.JumpPoint","JumpPoint")
hunk ./Name/Names.hs 67
-tc_IO = toName TypeConstructor       ("Jhc.Prim", "IO")
-tc_World__ = toName TypeConstructor  ("Jhc.Prim","World__")
hunk ./Name/Names.hs 77
-tc_Bool = toName TypeConstructor   ("Jhc.Order","Bool")
hunk ./Name/Names.hs 78
-tc_Target = toName TypeConstructor ("Jhc.Options","Target")
hunk ./Name/Names.hs 79
-tc_Ptr = toName TypeConstructor   ("Jhc.Addr","Ptr")
-tc_Ratio = toName TypeConstructor ("Jhc.Num","Ratio")
-tc_Unit = toName TypeConstructor  ("Jhc.Basics","()")
hunk ./Name/Names.hs 136
-class_Eq = toName ClassName ("Jhc.Order","Eq")
-class_Ord = toName ClassName ("Jhc.Order","Ord")
-class_Enum = toName ClassName ("Jhc.Enum","Enum")
-class_Bounded = toName ClassName ("Jhc.Enum","Bounded")
-class_Show = toName ClassName ("Jhc.Show","Show")
-class_Read = toName ClassName ("Prelude.Text","Read")
-class_Ix = toName ClassName ("Ix","Ix")
-class_Functor = toName ClassName ("Jhc.Monad","Functor")
-class_Monad = toName ClassName ("Jhc.Monad","Monad")
-class_Num = toName ClassName ("Jhc.Num","Num")
-class_Real = toName ClassName ("Jhc.Num","Real")
-class_Integral = toName ClassName ("Jhc.Num","Integral")
-class_Fractional = toName ClassName ("Jhc.Num","Fractional")
-class_Floating = toName ClassName ("Jhc.Float","Floating")
-class_RealFrac = toName ClassName ("Jhc.Float","RealFrac")
-class_RealFloat = toName ClassName ("Jhc.Float","RealFloat")
addfile ./data/names.txt
hunk ./data/names.txt 1
+
+TypeConstructor:tc:
+
+JumpPoint Jhc.JumpPoint.JumpPoint
+IO        Jhc.Prim.IO
+World__   Jhc.Prim.World__
+Bool      Jhc.Order.Bool
+Target    Jhc.Options.Target
+Ptr       Jhc.Addr.Ptr
+Ratio     Jhc.Num.Ratio
+Unit      Jhc.Basics.()
+
+DataConstructor:dc:
+
+Rational   Jhc.Num.:%
+Cons       Jhc.Prim.:
+EmptyList  Jhc.Prim.[]
+Unit       Jhc.Basics.()
+Boolzh     Jhc.Order.Bool#
+Target     Jhc.Options.Target#
+
+ClassName:class:
+Eq              Jhc.Order.Eq
+Ord             Jhc.Order.Ord
+Enum            Jhc.Enum.Enum
+Bounded         Jhc.Enum.Bounded
+Show            Jhc.Show.Show
+Read            Prelude.Text.Read
+Ix              Ix.Ix
+Functor         Jhc.Monad.Functor
+Monad           Jhc.Monad.Monad
+Num             Jhc.Num.Num
+Real            Jhc.Num.Real
+Integral	Jhc.Num.Integral
+Fractional	Jhc.Num.Fractional
+Floating	Jhc.Float.Floating
+RealFrac	Jhc.Float.RealFrac
+RealFloat	Jhc.Float.RealFloat
+
+
hunk ./utils/op_names.prl 28
+my %done;
hunk ./utils/op_names.prl 39
-
+    next if $done{"tc_$sname"}++;
+    next if $done{"dc_$sname"}++;
hunk ./utils/op_names.prl 57
+my ($nametype,$leader);
+open my $fd, "<data/names.txt";
+while(<$fd>) {
+    chomp;
+    next unless /\S/;
+    next if /^\s*#/;
+    ($nametype,$leader) = ($1,$2),next if /^([A-Za-z]+):([a-z]+):\s*$/;
+    /^([_A-Za-z]+)\s+([_A-Za-z.@]+)\.([)(#A-Za-z%:_\[\]]+)\s*$/ or die "unrecognized line $_";
+    my ($name,$mod,$var) = ($1,$2,$3);
+    $name = $leader . "_" . $name;
+    next if $done{$name};
+    print "{-# NOINLINE $name #-}\n";
+    print "$name = toName $nametype (\"$mod\",\"$var\")\n";
+
+}
+
+