From: Duncan C. <dun...@wo...> - 2006-01-26 22:13:29
|
Wed Jan 25 15:36:48 PST 2006 Duncan Coutts <du...@co...> * Some apiGen updates First go at generating new style signals and deprecating the old ones. Some minor fixes to the module scanning. Pick up deprecated pragmas, but that info is not yet used. hunk ./tools/apiGen/ApiGen.hs 160 - module_methods = [] + module_methods = [], + module_deprecated = [] hunk ./tools/apiGen/CodeGen.hs 547 - ss "on". signalName. ss ", after". signalName. ss " :: ". signalType. - ss "on". signalName. ss " = connect_". connectCall. sc ' '. signalCName. ss " False". nl. - ss "after". signalName. ss " = connect_". connectCall. sc ' '. signalCName. ss " True" + ss (lowerCaseFirstChar signalName). ss " :: ". signalType. nl. + ss (lowerCaseFirstChar signalName). ss " = Signal (connect_". connectCall. sc ' '. signalCName. sc ')'. nl. + nl. + ss "on". ss signalName. ss ", after". ss signalName. ss " :: ". oldSignalType. + ss "on". ss signalName. ss " = connect_". connectCall. sc ' '. signalCName. ss " False". nl. + ss "after". ss signalName. ss " = connect_". connectCall. sc ' '. signalCName. ss " True". nl. + ss "{-# DEPRECATED on". ss signalName. ss " \"instead of 'on". ss signalName. ss " obj' use 'on obj ". + ss (lowerCaseFirstChar signalName). ss "'\" #-}". nl. + ss "{-# DEPRECATED after". ss signalName. ss " \"instead of 'on". ss signalName. ss " obj' use 'after obj ". + ss (lowerCaseFirstChar signalName). ss "'\" #-}" hunk ./tools/apiGen/CodeGen.hs 567 - signalType = ss (object_name object). ss "Class self => self\n". - ss " -> ". (if null paramTypes - then ss "IO ". ss returnType - else sc '('. sepBy " -> " (paramTypes ++ ["IO " ++ returnType]). sc ')'). + signalType = ss (object_name object). ss "Class self => Signal self (". callbackType. sc ')' + oldSignalType = ss (object_name object). ss "Class self => self\n". + ss " -> ". callbackType. hunk ./tools/apiGen/CodeGen.hs 571 - signalName = ss (toStudlyCaps . canonicalSignalName . signal_cname $ signal) + callbackType | null paramTypes = ss "IO ". ss returnType + | otherwise = sc '('. sepBy " -> " (paramTypes ++ ["IO " ++ returnType]). sc ')' + signalName = toStudlyCaps . canonicalSignalName . signal_cname $ signal hunk ./tools/apiGen/CodeGen.hs 676 + ((ss " ". ss (lowerCaseFirstChar signalName). sc ',' + ,(maybe "" signaldoc_since doc, notDeprecated)) + ,fromMaybe (maxBound::Int) (lookup ("on"++signalName) exportIndexMap)) + | (signal, doc) <- signals object (moduledoc_signals docs)] + ++ (sectionHeader "Deprecated" + . map fst + . sortBy (comparing snd)) + [ let signalName = (toStudlyCaps . canonicalSignalName . signal_cname) signal in [_$_] hunk ./tools/apiGen/CodeGen.hs 685 - ss " after". ss signalName. sc ',' + ss " after". ss signalName. sc ',' hunk ./tools/apiGen/ModuleScan.hs 35 - module_methods :: [MethodInfo] + module_methods :: [MethodInfo], + module_deprecated :: [String] -- {-# DEPRECATED #-} pragmas hunk ./tools/apiGen/ModuleScan.hs 56 + | Deprecated String hunk ./tools/apiGen/ModuleScan.hs 154 - module_methods = [ call | CCall call <- bodyLines ] + module_methods = [ call | CCall call <- bodyLines ], + module_deprecated = [ value | Deprecated value <- bodyLines ] hunk ./tools/apiGen/ModuleScan.hs 180 +scanLine _ ("{#-":"DEPRECATED":symbol:_)= Deprecated symbol hunk ./tools/apiGen/ModuleScan.hs 237 + ("set":_) -> None |