[don't create constant entries in memory when they can be encoded in a sptr_t
John Meacham <john@repetae.net>**20080311010726] hunk ./C/FromGrin2.hs 103
-        let tset = Set.fromList [ n | (HcNode n _,_) <- Grin.HashConst.toList h]
+        let tset = Set.fromList [ n | (HcNode n (_:_),_) <- Grin.HashConst.toList h]
+            tset' = Set.fromList [ n | (HcNode n [],_) <- Grin.HashConst.toList h]
hunk ./C/FromGrin2.hs 106
-        mapM_ tellTags (Set.toList tset)
+        mapM_ tellTags (Set.toList $ tset `mappend` tset')
hunk ./C/FromGrin2.hs 170
-            bn <- basicNode tyenv a ts 
-            case bn of 
+            bn <- basicNode tyenv a ts
+            case bn of
hunk ./C/FromGrin2.hs 505
-    cc nn@(HcNode a zs,i) = comm $$ cd $$ def where
-        comm = text "/* " <> tshow (nn) <> text " */"
+    comm nn = text "/* " <> tshow (nn) <> text " */"
+    cc nn@(HcNode a [],i) = comm nn $$ def where
+        def = text "#define c" <> tshow i <+> text "(sptr_t)" <> tshow (f_RAWWHAT (constant $ enum (nodeTagName a)))
+
+    cc nn@(HcNode a zs,i) = comm nn $$ cd $$ def where
hunk ./C/FromGrin2.hs 645
-        --Just [n'] | n' == t ->  return ()
+        Just [n'] | n' == t ->  return ()
hunk ./C/FromGrin2.hs 684
+            | null ts = []
hunk ./C/FromGrin2.hs 692
+basicNode tyenv a [] = case s of
+    Just [n'] | n' == a -> return $ Just (f_VALUE (constant $ number 0))
+    _ -> do tellTags a ; return . Just $ (f_RAWWHAT (constant $ enum (nodeTagName a)))
+    where Just TyTy { tySiblings = s@(~(Just ss)) } = findTyTy tyenv a