[print bound types differently depending on their kind, limit scope of bound type names.
John Meacham <john@repetae.net>**20060426234558] hunk ./FrontEnd/Representation.hs 38
+import Control.Monad.Identity
hunk ./FrontEnd/Representation.hs 266
+withNewNames ts action = subVarName $ do
+    ts' <- mapM newTyvarName ts
+    action ts'
+
+newTyvarName t = case tyvarKind t of
+    x@Star -> newLookupName (map (:[]) ['a' ..]) x t
+    y@(Star `Kfun` Star) -> newName (map (('f':) . show) [0 ..]) y t
+    z -> newLookupName (map (('t':) . show) [0 ..]) z t
+
+
hunk ./FrontEnd/Representation.hs 277
-prettyPrintType t  = unparse $ runVarName (f t) where
+prettyPrintType t  = unparse $ runIdentity (runVarNameT (f t)) where
hunk ./FrontEnd/Representation.hs 285
-        ts' <- mapM (newLookupName ['a'..] ()) vs
+        --ts' <- mapM (newLookupName ['a'..] ()) vs
+        --ts' <- mapM newTyvarName vs
+        withNewNames vs $ \ts' -> do
hunk ./FrontEnd/Representation.hs 291
-            [] ->  fixitize (N,-3) $ pop (text "forall" <+> hsep (map char ts') <+> text ". ")  (atomize t')
-            [p] -> fixitize (N,-3) $ pop (text "forall" <+> hsep (map char ts') <+> text "." <+> unparse p <+> text "=> ")  (atomize t')
-            ps ->  fixitize (N,-3) $ pop (text "forall" <+> hsep (map char ts') <+> text "." <+> tupled (map unparse ps) <+> text "=> ")  (atomize t')
+            [] ->  fixitize (N,-3) $ pop (text "forall" <+> hsep (map text ts') <+> text ". ")  (atomize t')
+            [p] -> fixitize (N,-3) $ pop (text "forall" <+> hsep (map text ts') <+> text "." <+> unparse p <+> text "=> ")  (atomize t')
+            ps ->  fixitize (N,-3) $ pop (text "forall" <+> hsep (map text ts') <+> text "." <+> tupled (map unparse ps) <+> text "=> ")  (atomize t')
hunk ./FrontEnd/Representation.hs 296
-        ts' <- mapM (newLookupName ['a'..] ()) vs
+        --ts' <- mapM (newLookupName ['a'..] ()) vs
+        --ts' <- mapM newTyvarName vs
+        withNewNames vs $ \ts' -> do
hunk ./FrontEnd/Representation.hs 302
-            [] ->  fixitize (N,-3) $ pop (text "exists" <+> hsep (map char ts') <+> text ". ")  (atomize t')
-            [p] -> fixitize (N,-3) $ pop (text "exists" <+> hsep (map char ts') <+> text "." <+> unparse p <+> text "=> ")  (atomize t')
-            ps ->  fixitize (N,-3) $ pop (text "exists" <+> hsep (map char ts') <+> text "." <+> tupled (map unparse ps) <+> text "=> ")  (atomize t')
+            [] ->  fixitize (N,-3) $ pop (text "exists" <+> hsep (map text ts') <+> text ". ")  (atomize t')
+            [p] -> fixitize (N,-3) $ pop (text "exists" <+> hsep (map text ts') <+> text "." <+> unparse p <+> text "=> ")  (atomize t')
+            ps ->  fixitize (N,-3) $ pop (text "exists" <+> hsep (map text ts') <+> text "." <+> tupled (map unparse ps) <+> text "=> ")  (atomize t')
hunk ./FrontEnd/Representation.hs 309
-            Just c  -> return $ atom $ char c
+            Just c  -> return $ atom $ text c