From: Wolfgang T. <wth...@us...> - 2005-07-26 01:30:07
|
Update of /cvsroot/hoc/hoc/InterfaceGenerator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25095/InterfaceGenerator Modified Files: ExportModule.hs Log Message: Further reduce code size by using "canned" CIFs instead of always calling the overloaded getCifForSelector Index: ExportModule.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/ExportModule.hs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ExportModule.hs 31 Mar 2005 15:30:19 -0000 1.5 +++ ExportModule.hs 26 Jul 2005 01:29:58 -0000 1.6 @@ -13,7 +13,7 @@ import Enums(enumName, pprEnumType) import NameCaseChange -import Data.Set hiding (map, null, filter, partition, empty) +import Data.Set(setToList, unionManySets, mkSet, intersect) import qualified Data.HashTable as HashTable import Data.List(nub, partition, isPrefixOf) import Data.Maybe(fromMaybe, catMaybes, mapMaybe, maybeToList, isNothing) @@ -314,7 +314,12 @@ groupImports thisModule = filter (\(mod, _) -> mod /= thisModule) . groupByFirst idsForClass :: String -> [String] -idsForClass name = [name, "_" ++ name, name ++ "Class", "super_" ++ name] +idsForClass name = [name, "_" ++ name, name ++ "Class", "super_" ++ name + -- we also need to export the phantom type + -- and a data constructor(!) for it, in order to + -- work around GHC bug #1244882. + , name ++ "_(..)" + ] idsForSel :: String -> [String] idsForSel name = [name, "Has_" ++ name, "info_" ++ name, "ImpType_" ++ name] |