From: Wolfgang T. <wth...@us...> - 2006-03-20 06:32:59
|
Update of /cvsroot/hoc/hoc/InterfaceGenerator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18040/InterfaceGenerator Modified Files: CTypeToHaskell.hs Log Message: Handle the Class type. Index: CTypeToHaskell.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/CTypeToHaskell.hs,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- CTypeToHaskell.hs 5 Oct 2005 02:55:49 -0000 1.8 +++ CTypeToHaskell.hs 20 Mar 2006 06:32:54 -0000 1.9 @@ -78,7 +78,12 @@ typ <- builtinTypeToHaskell bi return $ HType Nothing [] (Con typ) -cTypeToHaskell env retval tyvar (CTSimple name) +cTypeToHaskell env retval tyvar (CTSimple "Class") = + Just $ HType (if retval then Nothing else Just (tyvar,[])) + [] (Con "Class" :$ + (if retval then Con "()" else Var tyvar)) + +cTypeToHaskell env retval tyvar (CTSimple name) | name /= "" && isPlainType env name = return $ HType Nothing [name] (Con $ nameToUppercase name) |