[print better error messages on kind inference errors. change renaming of type synonyms
John Meacham <john@repetae.net>**20060214082854] hunk ./FrontEnd/HsErrors.hs 67
+mapHsTypeHsType f (HsTyExists vs qt) = do
+    x <- f $ hsQualTypeType qt
+    return $ HsTyExists vs qt { hsQualTypeType = x }
hunk ./FrontEnd/KindInfer.hs 232
-   run =   runKI inputEnv $ mapM_ kiKindGroup kindGroups
+   run = runKI inputEnv $ withContext ("kiDecls: " ++ show (map getDeclName classAndDataDecls)) $ mapM_ kiKindGroup kindGroups
hunk ./FrontEnd/KindInfer.hs 271
-           Nothing -> error $ "kiAsst: could not find kind information for class: " ++ show className
+           Nothing -> fail $ "kiAsst: could not find kind information for class: " ++ show className
hunk ./FrontEnd/KindInfer.hs 287
+kiQualType varExist qt@(HsUnQualType t) = do
+        withContext ("kiQualType: " ++ show qt) $ do
+        kiType varExist t
hunk ./FrontEnd/KindInfer.hs 304
-                    error $ "kiType: could not find kind for this constructor: " ++ show name ++
-                         "\nin this kind environment:\n" ++ show env
+                    fail $ "kiType: could not find kind for this constructor: " ++ show name ++
+                         "\nin this kind environment:\n" ++ pprint env
hunk ./FrontEnd/KindInfer.hs 315
-                       -> error $ "kiType: could not find kind for this type variable: " ++ show name
+                       -> fail $ "kiType: could not find kind for this type variable: " ++ show name
hunk ./FrontEnd/KindInfer.hs 375
-    (_, newState) = unsafePerformIO $ runKI inputEnv $ do
+    (_, newState) = unsafePerformIO $ runKI inputEnv $ withContext ("kiHsQualType: " ++ show qualType) $ do
hunk ./FrontEnd/KindInfer.hs 416
-namesFromType HsTyForall { hsTypeVars = vs } = map (toName TypeVal . hsTyVarBindName) vs
-namesFromType HsTyExists { hsTypeVars = vs } = map (toName TypeVal . hsTyVarBindName) vs
+namesFromType (HsTyForall _vs qt) = namesFromQualType qt -- map (toName TypeVal . hsTyVarBindName) vs
+namesFromType (HsTyExists _vs qt) = namesFromQualType qt -- map (toName TypeVal . hsTyVarBindName) vs
+--namesFromType HsTyExists { hsTypeVars = vs } = map (toName TypeVal . hsTyVarBindName) vs
hunk ./FrontEnd/KindInfer.hs 600
-
-
hunk ./FrontEnd/Rename.hs 361
-    t' <- renameHsType' False t subTable'
+    t' <- renameHsType t subTable'
hunk ./FrontEnd/TypeSynonyms.hs 76
-        let nvs = [ (hsTyVarBindName v,v { hsTyVarBindName = hsNameIdent_u (hsIdentString_u (++ ('@':show n))) (hsTyVarBindName v)})| (n,v) <- zip ns vs ]
+        let nvs = [ (hsTyVarBindName v,v { hsTyVarBindName = hsNameIdent_u (hsIdentString_u ((show n ++ "00") ++)) (hsTyVarBindName v)})| (n,v) <- zip ns vs ] 
hunk ./FrontEnd/TypeSynonyms.hs 82
-        let nvs = [ (hsTyVarBindName v,v { hsTyVarBindName = hsNameIdent_u (hsIdentString_u (++ ('@':show n))) (hsTyVarBindName v)})| (n,v) <- zip ns vs ]
+        let nvs = [ (hsTyVarBindName v,v { hsTyVarBindName = hsNameIdent_u (hsIdentString_u ((show n ++ "00") ++)) (hsTyVarBindName v)})| (n,v) <- zip ns vs ] 