You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(127) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
(35) |
Apr
(23) |
May
|
Jun
(1) |
Jul
(48) |
Aug
(23) |
Sep
(10) |
Oct
(4) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
(27) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2007 |
Jan
|
Feb
(16) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(19) |
Oct
(25) |
Nov
(8) |
Dec
(25) |
2009 |
Jan
(6) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(25) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Wolfgang T. <wth...@us...> - 2005-09-27 11:55:39
|
Update of /cvsroot/hoc/hoc/Bindings/AdditionalCode/Foundation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12043/Bindings/AdditionalCode/Foundation Modified Files: NSGeometry.hs Log Message: A monster commit, brought to you by the Greater Toronto Airport Authority and Czech Airlines. HOC now supports: * Marshalling of exceptions NSExceptions get marshalled into Haskell exceptions that can be caught using Foundation.NSException.catchNS. Haskell exceptions get wrapped in a (private) subclass of NSException and marshalled back if they re-enter Haskell land. * importing of extern constants $(declareExternConst "NSDeviceRGBColorSpace" [t| NSString () |]) * importing of global functions (e.g. NSRectFill) using HOC marshalling: $(declareExternFun "NSRectFill" [t| NSRect -> IO () |]) * ifgen generates constant & function declarations automatically from Foundation and AppKit headers. Index: NSGeometry.hs =================================================================== RCS file: /cvsroot/hoc/hoc/Bindings/AdditionalCode/Foundation/NSGeometry.hs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- NSGeometry.hs 27 Feb 2004 12:23:03 -0000 1.1 +++ NSGeometry.hs 27 Sep 2005 11:55:22 -0000 1.2 @@ -6,9 +6,6 @@ --X NSPoint(..) --X NSSize(..) --X NSRect(..) ---X nsZeroPoint ---X nsZeroSize ---X nsZeroRect --X nsMaxX --X nsMaxY --X nsMidX @@ -29,9 +26,12 @@ data NSSize = NSSize Float Float deriving(Read, Show, Eq) data NSRect = NSRect NSPoint NSSize deriving(Read, Show, Eq) +{- +-- They're imported automatically now. nsZeroPoint = NSPoint 0 0 nsZeroSize = NSSize 0 0 nsZeroRect = NSRect nsZeroPoint nsZeroSize +-} nsMaxX (NSRect (NSPoint x y) (NSSize w h)) = x + w nsMaxY (NSRect (NSPoint x y) (NSSize w h)) = y + h |
From: Wolfgang T. <wth...@us...> - 2005-09-27 11:55:39
|
Update of /cvsroot/hoc/hoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12043 Modified Files: config.mk.in Log Message: A monster commit, brought to you by the Greater Toronto Airport Authority and Czech Airlines. HOC now supports: * Marshalling of exceptions NSExceptions get marshalled into Haskell exceptions that can be caught using Foundation.NSException.catchNS. Haskell exceptions get wrapped in a (private) subclass of NSException and marshalled back if they re-enter Haskell land. * importing of extern constants $(declareExternConst "NSDeviceRGBColorSpace" [t| NSString () |]) * importing of global functions (e.g. NSRectFill) using HOC marshalling: $(declareExternFun "NSRectFill" [t| NSRect -> IO () |]) * ifgen generates constant & function declarations automatically from Foundation and AppKit headers. Index: config.mk.in =================================================================== RCS file: /cvsroot/hoc/hoc/config.mk.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- config.mk.in 19 May 2004 16:06:03 -0000 1.5 +++ config.mk.in 27 Sep 2005 11:55:22 -0000 1.6 @@ -31,3 +31,4 @@ mkdir -p "$(dist_dir)/$(dist_srcdir)" cp -R $(dist_FILES) "$(dist_dir)/$(dist_srcdir)" +CFLAGS+= -I$(GHC_LIB_PATH)/include |
From: Wolfgang T. <wth...@us...> - 2005-09-27 11:55:39
|
Update of /cvsroot/hoc/hoc/HOC_cbits In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12043/HOC_cbits Added Files: Exceptions.m Log Message: A monster commit, brought to you by the Greater Toronto Airport Authority and Czech Airlines. HOC now supports: * Marshalling of exceptions NSExceptions get marshalled into Haskell exceptions that can be caught using Foundation.NSException.catchNS. Haskell exceptions get wrapped in a (private) subclass of NSException and marshalled back if they re-enter Haskell land. * importing of extern constants $(declareExternConst "NSDeviceRGBColorSpace" [t| NSString () |]) * importing of global functions (e.g. NSRectFill) using HOC marshalling: $(declareExternFun "NSRectFill" [t| NSRect -> IO () |]) * ifgen generates constant & function declarations automatically from Foundation and AppKit headers. --- NEW FILE: Exceptions.m --- #include <objc/objc.h> #include "NewClass.h" #include "Class.h" #include "Selector.h" #include "HsFFI.h" static BOOL excWrapperInited = NO; static int stablePtrOffset; static id clsHOCHaskellException; static SEL selExceptionWithNameReasonUserInfo = 0; static SEL selDealloc; //static void initExceptionWrapper() __attribute__((constructor)); static void exc_dealloc(id self, SEL sel) { HsStablePtr sp = * (HsStablePtr*) (((char*)self) + stablePtrOffset); struct objc_super super; hs_free_stable_ptr(sp); super.receiver = self; super.class = self->isa->super_class; objc_msgSendSuper(&super, selDealloc); } static void initExceptionWrapper() { if(!excWrapperInited) { struct objc_method_list *methods = makeMethodList(1); struct objc_method_list *class_methods = makeMethodList(0); struct objc_ivar_list *ivars = makeIvarList(1); selDealloc = getSelectorForName("dealloc"); #ifdef GNUSTEP methods->method_list[0].method_name = "dealloc"; #else methods->method_list[0].method_name = selDealloc; #endif methods->method_list[0].method_types = "v@:"; methods->method_list[0].method_imp = (IMP) &exc_dealloc; setIvarInList(ivars, 0, "_haskellExecption", "^v", 0); newClass(getClassByName("NSException"), "HOCHaskellException", sizeof(void*), ivars, methods, class_methods); clsHOCHaskellException = getClassByName("HOCHaskellException"); stablePtrOffset = ivars->ivar_list[0].ivar_offset; selExceptionWithNameReasonUserInfo = getSelectorForName("exceptionWithName:reason:userInfo:"); excWrapperInited = YES; } } id wrapHaskellException(char *name, HsStablePtr hexc) { id cexc; initExceptionWrapper(); cexc = objc_msgSend(clsHOCHaskellException, selExceptionWithNameReasonUserInfo, utf8ToNSString("HaskellException"), nil, nil); * (HsStablePtr*) (((char*)cexc) + stablePtrOffset) = hexc; return cexc; } HsStablePtr unwrapHaskellException(id cexc) { if(cexc->isa == clsHOCHaskellException) { return *(HsStablePtr*) (((char*)cexc) + stablePtrOffset); } else return nil; } |
From: Wolfgang T. <wth...@us...> - 2005-09-27 11:55:38
|
Update of /cvsroot/hoc/hoc/HOC/HOC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12043/HOC/HOC Modified Files: Arguments.hs ExportClass.hs Invocation.hs Added Files: ExternConstants.hs ExternFunctions.hs Dyld.hs Exception.hs Exception.hs-boot Log Message: A monster commit, brought to you by the Greater Toronto Airport Authority and Czech Airlines. HOC now supports: * Marshalling of exceptions NSExceptions get marshalled into Haskell exceptions that can be caught using Foundation.NSException.catchNS. Haskell exceptions get wrapped in a (private) subclass of NSException and marshalled back if they re-enter Haskell land. * importing of extern constants $(declareExternConst "NSDeviceRGBColorSpace" [t| NSString () |]) * importing of global functions (e.g. NSRectFill) using HOC marshalling: $(declareExternFun "NSRectFill" [t| NSRect -> IO () |]) * ifgen generates constant & function declarations automatically from Foundation and AppKit headers. --- NEW FILE: ExternConstants.hs --- module HOC.ExternConstants(declareExternConst) where import HOC.TH import HOC.Arguments import HOC.NameCaseChange import HOC.Dyld import Foreign declareExternConst :: String -> TypeQ -> Q [Dec] declareExternConst name typ = sequence [ sigD n typ, valD (varP n) (normalB expr) [] ] where n = mkName $ nameToLowercase name expr = [| getGlobalVar $(stringE name) |] getGlobalVar name = unsafePerformIO $ lookupSymbol name >>= peek . castFunPtrToPtr >>= importArgument getGlobalVar# name# = unsafePerformIO $ lookupSymbol# name# >>= peek . castFunPtrToPtr >>= importArgument Index: ExportClass.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC/ExportClass.hs,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ExportClass.hs 26 Jul 2005 03:11:43 -0000 1.8 +++ ExportClass.hs 27 Sep 2005 11:55:22 -0000 1.9 @@ -16,6 +16,7 @@ import HOC.Class import HOC.NewClass import HOC.TH +import HOC.Exception data ClassMember = InstanceMethod SelectorInfo Index: Arguments.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC/Arguments.hs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Arguments.hs 29 Jul 2005 03:39:44 -0000 1.4 +++ Arguments.hs 27 Sep 2005 11:55:22 -0000 1.5 @@ -92,8 +92,17 @@ let orderedArgs = (last args : sel : init args) ffiPrepCif ret orderedArgs +makeCifForFunction fun = do + args <- objCImpGetArgsFFI fun + ret <- objCImpGetRetFFI fun + ffiPrepCif ret args + {-# NOINLINE getCifForSelector #-} -- might be called from generated code getCifForSelector sel = unsafePerformIO $ makeCifForSelector sel + +{-# NOINLINE getCifForFunction #-} -- might be called from generated code +getCifForFunction fun = unsafePerformIO $ makeCifForFunction fun + objCMethodType thing = ret ++ concat (last args : ":" : init args) where --- NEW FILE: Exception.hs --- module HOC.Exception where import Data.Typeable import Foreign import Foreign.C.String ( CString, withCString ) import Prelude hiding ( catch ) import Control.Exception ( evaluate, throwIO, throwDyn, catchDyn, catch ) import HOC.Base import HOC.Arguments import HOC.ID data WrappedNSException = WrappedNSException (ID ()) deriving Typeable foreign import ccall unsafe wrapHaskellException :: CString -> StablePtr a -> IO (Ptr ObjCObject) foreign import ccall unsafe unwrapHaskellException :: Ptr ObjCObject -> IO (StablePtr a) exceptionObjCToHaskell :: Ptr ObjCObject -> IO a exceptionObjCToHaskell exception = do sptr <- unwrapHaskellException exception if (castStablePtrToPtr sptr == nullPtr) then do exc <- importArgument exception evaluate $ throwDyn $ WrappedNSException exc else do exc <- deRefStablePtr sptr throwIO exc exceptionHaskellToObjC :: IO a -> IO (Ptr ObjCObject) exceptionHaskellToObjC action = (action >> return nullPtr) `catchDyn` (\(WrappedNSException exc) -> exportArgument exc) `catch` (\exc -> withCString (show exc) $ \cstr -> newStablePtr exc >>= wrapHaskellException cstr) --- NEW FILE: ExternFunctions.hs --- module HOC.ExternFunctions(declareExternFun) where import HOC.TH import HOC.Arguments import HOC.Invocation import HOC.Dyld import HOC.NameCaseChange import Foreign import System.IO.Unsafe declareExternFun :: String -> TypeQ -> Q [Dec] declareExternFun name typeSigQ = do typeSig <- typeSigQ let n = mkName $ nameToLowercase name cifN = mkName $ "cif__" ++ name ptrN = mkName $ "c__" ++ name -- ### FIXME: Code Duplication from SelectorMarshaller.hs arguments = [ "arg" ++ show i | i <- [1..nArgs] ] argumentsToMarshal = map (varE.mkName) arguments marshalledArguments = map (mkName . (++"'")) arguments marshallerBody = marshallArgs $ collectArgs $ invoke marshallArgs = marshallArgs' argumentsToMarshal marshalledArguments where marshallArgs' [] [] e = e marshallArgs' (arg:args) (arg':args') e = [| withMarshalledArgument $(arg) $(lamE [varP arg'] e') |] where e' = marshallArgs' args args' e collectArgs e = [| withArray $(listE (map varE marshalledArguments)) $(lamE [varP $ mkName "args"] e) |] invoke | isUnit = [| callWithoutRetval $(varE cifN) $(varE ptrN) $(varE $ mkName "args")|] | otherwise = [| callWithRetval $(varE cifN) $(varE ptrN) $(varE $ mkName "args")|] -- ### FIXME: Code Duplication from DeclareSelector.hs countArgs (ForallT vars ctxt ty) = countArgs ty countArgs ((ArrowT `AppT` _) `AppT` rest) = 1 + countArgs rest countArgs other = 0 resultType (ForallT vars ctxt ty) = resultType ty resultType ((ArrowT `AppT` _) `AppT` rest) = resultType rest resultType other = other (isPure, pureType) = case resultType typeSig of (ConT con) `AppT` ty | con == ''IO -> (False, ty) ty -> error $ name ++ " --- function type must be in the IO monad" -- ty -> (True, ty) isUnit = pureType == ConT ''() nArgs = countArgs typeSig -- in sequence [ sigD n typeSigQ, valD (varP cifN) (normalB [| getCifForFunction $(varE n) |]) [], valD (varP ptrN) (normalB [| unsafePerformIO $ lookupSymbol $(stringE name) |]) [], funD n [ clause (map (varP.mkName) arguments) (normalB $ marshallerBody) [] ] ] --- NEW FILE: Exception.hs-boot --- module HOC.Exception where import HOC.Base import Foreign exceptionObjCToHaskell :: Ptr ObjCObject -> IO a exceptionHaskellToObjC :: IO a -> IO (Ptr ObjCObject) --- NEW FILE: Dyld.hs --- module HOC.Dyld( lookupSymbol, lookupSymbol# ) where import GHC.Exts(Ptr(..), Addr#) import Foreign import Foreign.C.String -- Up to GHC 6.4.0, there was a bug where rtldDefault was marshalled -- incorrectly for Mac OS X, so we do it by hand. foreign import ccall "dlsym" c_dlsym :: Ptr () -> CString -> IO (FunPtr a) rtldDefault = nullPtr `plusPtr` (-2) lookupSymbol :: String -> IO (FunPtr a) lookupSymbol# :: Addr# -> IO (FunPtr a) lookupSymbol name = withCString name (c_dlsym rtldDefault) lookupSymbol# name# = c_dlsym rtldDefault (Ptr name#) Index: Invocation.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC/Invocation.hs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Invocation.hs 27 Oct 2003 16:48:09 -0000 1.1.1.1 +++ Invocation.hs 27 Sep 2005 11:55:22 -0000 1.2 @@ -1,13 +1,14 @@ module HOC.Invocation where import Foreign -import Control.Monad ( when ) -import Control.Exception ( bracket ) +import Control.Monad ( when ) import HOC.Base import HOC.Arguments import HOC.FFICallInterface +import {-# SOURCE #-} HOC.Exception + foreign import ccall "Invocation.h callWithExceptions" c_callWithExceptions :: FFICif -> FunPtr a -> Ptr b -> Ptr (Ptr ()) @@ -16,12 +17,12 @@ callWithException cif fun ret args = do exception <- c_callWithExceptions cif fun ret args when (exception /= nullPtr) $ - error "## exception marshalling not yet implemented ###" + exceptionObjCToHaskell exception withMarshalledArgument :: ObjCArgument a b => a -> (Ptr () -> IO c) -> IO c withMarshalledArgument arg act = - withExportedArgument arg (\exported -> withObject exported (act . castPtr)) + withExportedArgument arg (\exported -> with exported (act . castPtr)) callWithoutRetval :: FFICif -> FunPtr a -> Ptr (Ptr ()) @@ -50,7 +51,3 @@ p <- peekElemOff args idx arg <- peek (castPtr p) importArgument arg - -exceptionHaskellToObjC action = - action >> return nullPtr {- ### `catch` return some nsexception -} - \ No newline at end of file |
From: Wolfgang T. <wth...@us...> - 2005-09-27 11:55:35
|
Update of /cvsroot/hoc/hoc/InterfaceGenerator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12043/InterfaceGenerator Modified Files: CTypeToHaskell.hs ExportModule.hs Main.hs Parser.hs PrepareDeclarations.hs SyntaxTree.hs Log Message: A monster commit, brought to you by the Greater Toronto Airport Authority and Czech Airlines. HOC now supports: * Marshalling of exceptions NSExceptions get marshalled into Haskell exceptions that can be caught using Foundation.NSException.catchNS. Haskell exceptions get wrapped in a (private) subclass of NSException and marshalled back if they re-enter Haskell land. * importing of extern constants $(declareExternConst "NSDeviceRGBColorSpace" [t| NSString () |]) * importing of global functions (e.g. NSRectFill) using HOC marshalling: $(declareExternFun "NSRectFill" [t| NSRect -> IO () |]) * ifgen generates constant & function declarations automatically from Foundation and AppKit headers. Index: PrepareDeclarations.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/PrepareDeclarations.hs,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- PrepareDeclarations.hs 29 Jul 2005 03:39:44 -0000 1.12 +++ PrepareDeclarations.hs 27 Sep 2005 11:55:22 -0000 1.13 @@ -31,6 +31,8 @@ pdAllInstanceSels :: [(ClassInfo, [(MangledSelector, SelectorLocation)])], pdAllClassSels :: [(ClassInfo, [(MangledSelector, SelectorLocation)])], pdEnumTypeDefinitions :: FiniteMap ModuleName [EnumType], + pdExternVarDeclarations :: FiniteMap ModuleName [(HType, String, String)], + pdExternFunDeclarations :: FiniteMap ModuleName [MangledSelector], pdTypeEnvironment :: TypeEnvironment } @@ -259,10 +261,33 @@ let allInstanceSels :: [ (ClassInfo, [(MangledSelector, SelectorLocation)]) ] allInstanceSels = [ (ci, mangleSelectors False (ciName ci) (ciNewInstanceMethods ci)) - | ci <- map snd cleanClassInfos ] + | ci <- map snd cleanClassInfos ] allClassSels :: [ (ClassInfo, [(MangledSelector, SelectorLocation)]) ] - allClassSels = [ (ci, mangleSelectors True (ciName ci) (ciNewClassMethods ci)) - | ci <- map snd cleanClassInfos ] + allClassSels = [ (ci, mangleSelectors True (ciName ci) (ciNewClassMethods ci)) + | ci <- map snd cleanClassInfos ] + + externVarDeclarations = extractDecls varDecl + where varDecl (ExternVar t n) + = do + ht <- getVariableType typeEnv t + return (ht, n, nameToLowercase n) + + varDecl _ = Nothing + + externFunDeclarations = extractDecls funDecl + where funDecl (ExternFun sel) + = do + typ <- getSelectorType PlainSelector typeEnv sel + return $ MangledSelector { + msSel = sel, + msMangled = nameToLowercase (selName sel), + msType = typ + } + funDecl _ = Nothing + + extractDecls f = listToFM $ + map (\(HeaderInfo mod _ decls) -> (mod, mapMaybe f decls)) $ + modules mangleSelectors factory clsName sels = mapMaybe (\(sel, location) -> do {- Maybe -} @@ -305,5 +330,7 @@ pdAllInstanceSels = allInstanceSels, pdAllClassSels = allClassSels, pdEnumTypeDefinitions = enumDefinitions, + pdExternVarDeclarations = externVarDeclarations, + pdExternFunDeclarations = externFunDeclarations, pdTypeEnvironment = typeEnv } Index: Parser.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/Parser.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Parser.hs 31 Mar 2005 20:48:18 -0000 1.2 +++ Parser.hs 27 Sep 2005 11:55:22 -0000 1.3 @@ -41,6 +41,7 @@ <|> interface_decl <|> empty_decl <|> (fmap Just type_declaration) + <|> extern_decl empty_decl = semi objc >> return Nothing @@ -244,6 +245,26 @@ type_declaration = typedef <|> ctypeDecl +extern_decl = + extern_keyword >> ctype >>= \t -> identifier objc >>= \n -> + do + args <- parens objc (commaSep objc argument) + semi objc + return $ Just $ ExternFun (Selector n t args False) + <|> do + semi objc + return $ Just $ ExternVar t n + where + argument = do t <- ctype + optional (identifier objc) + return t + + +extern_keyword = + reserved objc "extern" + <|> reserved objc "FOUNDATION_EXPORT" -- N.B. "Export" vs. "Extern". + <|> reserved objc "APPKIT_EXTERN" + skipParens = parens objc (skipMany ( (satisfy (\x -> x /= '(' && x /= ')') >> return ()) <|> skipParens Index: Main.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/Main.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Main.hs 31 Mar 2005 15:30:19 -0000 1.6 +++ Main.hs 27 Sep 2005 11:55:22 -0000 1.7 @@ -6,7 +6,6 @@ import qualified Data.HashTable as HashTable import Data.List(isPrefixOf,isSuffixOf,partition) import Data.Maybe(fromMaybe,mapMaybe,isJust,isNothing,catMaybes,maybeToList) -import Data.Set hiding (map, filter, null, partition, empty) import Control.Monad(unless) import System.Info(os) @@ -84,7 +83,14 @@ return $ map fst $ order $ zip mods deps modules <- fmap concat $ mapM (orderModules2 . headerNames) [foundationModules, appKitModules] - + + {- Debug Output: + print $ concat [ [ d | d@(ExternVar _ _) <- ds ] + | HeaderInfo _ _ ds <- foundationModules ++ appKitModules ] + print $ concat [ [ d | d@(ExternFun _) <- ds ] + | HeaderInfo _ _ ds <- foundationModules ++ appKitModules ] + -} + selsDefinedWhere <- HashTable.new (==) (\sel -> HashTable.hashString (selName sel)) allSelNames <- HashTable.new (==) HashTable.hashString Index: ExportModule.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/ExportModule.hs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ExportModule.hs 29 Jul 2005 03:39:44 -0000 1.7 +++ ExportModule.hs 27 Sep 2005 11:55:22 -0000 1.8 @@ -18,7 +18,7 @@ import qualified Data.HashTable as HashTable import Data.List(nub, partition, isPrefixOf) import Data.Maybe(fromMaybe, catMaybes, mapMaybe, maybeToList, isNothing) -import Data.FiniteMap(lookupFM) +import Data.FiniteMap(lookupFM, lookupWithDefaultFM) import Text.PrettyPrint.HughesPJ getModuleDependencies :: PreparedDeclarations -> ModuleName -> IO [ModuleName] @@ -54,6 +54,8 @@ pdAllInstanceSels = allInstanceSels, pdAllClassSels = allClassSels, pdEnumTypeDefinitions = allEnumDefinitions, + pdExternVarDeclarations = allVarDeclarations, + pdExternFunDeclarations = allFunDeclarations, pdTypeEnvironment = typeEnv }) selsDefinedWhere @@ -184,8 +186,14 @@ protoAdoptions = concat [ [ (proto ++ "Protocol", ciName ci) | proto <- setToList $ ciNewProtocols ci] | ci <- definedClassInfos, not (ciProtocol ci) ] + + varDeclarations = lookupWithDefaultFM allVarDeclarations [] moduleName + funDeclarations = lookupWithDefaultFM allFunDeclarations [] moduleName - let mentionedTypeNames = nub $ concatMap (mentionedTypes . msType) selDefinitions + let mentionedTypeNames = nub $ + concatMap (mentionedTypes.msType) (selDefinitions ++ funDeclarations) + ++ concatMap (\(t,_,_) -> varMentionedTypes t) varDeclarations + -- ### we discard the information about where to import it from -- and then recover it later - not nice @@ -259,6 +267,8 @@ : "module HOC" : exportedSels ++ exportedProtos ++ map ("module "++) superClassModules + ++ map (\(_,_,hn) -> hn) varDeclarations + ++ map msMangled funDeclarations ++ additionalExports )) <+> text "where", @@ -294,10 +304,14 @@ ++ map pprProtocolDecl protocolsToDeclare ++ [text "-- protocol adoptions"] ++ map pprProtoAdoption protoAdoptions + ++ [text "-- extern constants"] + ++ map pprVarDecl varDeclarations + ++ [text "-- extern functions"] + ++ map pprFunDecl funDeclarations ++ (map text $ additionalCodeBelow) - + if anythingGoingOn then do createDirectoryIfNecessary forwardDirName @@ -316,11 +330,11 @@ idsForClass :: String -> [String] 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 ++ "_(..)" - ] + -- 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] @@ -367,3 +381,15 @@ pprProtoAdoption :: (String, String) -> Doc pprProtoAdoption (protoName, className) = text "instance" <+> text protoName <+> parens (text className <+> text "a") + +pprVarDecl :: (HType, String, String) -> Doc +pprVarDecl (t, name, _) = text "$" <> parens (text "declareExternConst" + <+> doubleQuotes (text name) + <+> text "[t|" <+> pprVariableType t <+> text "|]" + ) + +pprFunDecl :: MangledSelector -> Doc +pprFunDecl ms = text "$" <> parens (text "declareExternFun" + <+> doubleQuotes (text $ msName ms) + <+> text "[t|" <+> pprSelectorType (msType ms) <+> text "|]" + ) Index: SyntaxTree.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/SyntaxTree.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- SyntaxTree.hs 25 Feb 2004 15:11:21 -0000 1.2 +++ SyntaxTree.hs 27 Sep 2005 11:55:22 -0000 1.3 @@ -6,6 +6,8 @@ | SelectorList SelectorListHeader [SelectorListItem] | Typedef CType String | CTypeDecl CType + | ExternVar CType String + | ExternFun Selector deriving (Show,Eq,Ord) data SelectorListHeader = Index: CTypeToHaskell.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/CTypeToHaskell.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- CTypeToHaskell.hs 29 Jul 2005 03:39:44 -0000 1.6 +++ CTypeToHaskell.hs 27 Sep 2005 11:55:22 -0000 1.7 @@ -8,7 +8,11 @@ HSelectorType, SelectorKind(..), getSelectorType, - mentionedTypes) where + getVariableType, + pprVariableType, + HType(..), + mentionedTypes, + varMentionedTypes) where import SyntaxTree import Headers(ModuleName) @@ -208,3 +212,12 @@ mentionedTypes (HSelectorType tyvars context mentioned types) = mentioned + +getVariableType :: TypeEnvironment -> CType -> Maybe HType +pprVariableType :: HType -> Doc + +getVariableType env t = cTypeToHaskell env True (error "### getVariableType") t + +pprVariableType (HType _ _ tt) = pprHTypeTerm False tt + +varMentionedTypes (HType _ mentioned _) = mentioned |
From: Wolfgang T. <wth...@us...> - 2005-08-07 16:41:44
|
Update of /cvsroot/hoc/hoc/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6280 Modified Files: Mapping_Types.pod Log Message: Correct a detail about enum name mangling and add a :: CInt to the constant decls. Index: Mapping_Types.pod =================================================================== RCS file: /cvsroot/hoc/hoc/docs/Mapping_Types.pod,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Mapping_Types.pod 6 Aug 2005 16:22:31 -0000 1.7 +++ Mapping_Types.pod 7 Aug 2005 16:41:09 -0000 1.8 @@ -218,7 +218,7 @@ name as the enum, with each of its constructors corresponding to one of the enum definitions. A value ("constant function") will also be created for each enum definition, with the first letter -and the initial "NS" lowercased, if that's present. The Haskell +or the initial "NS" lowercased, if that's present. The Haskell data type will belong to the C<Eq>, C<Ord>, C<Read>, C<Show>, and and C<HOC.CEnum> type classes. If you need to use the literal integer value of the enum, use the C<HOC.fromCEnum> and @@ -251,8 +251,8 @@ foo = Foo bar = Bar - nsbaz = NSBaz - nsquux = NSQuux + nsBaz = NSBaz + nsQuux = NSQuux On the other hand, I<anonymous enums> are marshalled to simple values only. The following example anonymous C enum: @@ -261,8 +261,8 @@ will be marshalled to: - nsfoo = 1 - bar = 3 + nsFoo = 1 :: CInt + bar = 3 :: CInt =head3 C<struct> Types |
From: Andre P. <at...@us...> - 2005-08-06 16:45:50
|
Update of /cvsroot/hoc/hoc/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20311/docs Modified Files: Makefile.in Log Message: Fix rm command in 'make clean' target so it doesn't complain about rm'ing non-existent files Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/docs/Makefile.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile.in 30 Jul 2005 08:33:04 -0000 1.11 +++ Makefile.in 6 Aug 2005 16:45:38 -0000 1.12 @@ -71,5 +71,5 @@ @true clean: - -rm HOC.html pod2htm*.tmp documentation.html + rm -f HOC.html pod2htm*.tmp documentation.html |
From: Andre P. <at...@us...> - 2005-08-06 16:45:50
|
Update of /cvsroot/hoc/hoc/Samples/UniqSort In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20311/Samples/UniqSort Modified Files: Makefile Log Message: Fix rm command in 'make clean' target so it doesn't complain about rm'ing non-existent files Index: Makefile =================================================================== RCS file: /cvsroot/hoc/hoc/Samples/UniqSort/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 27 Jul 2005 02:55:40 -0000 1.5 +++ Makefile 6 Aug 2005 16:45:38 -0000 1.6 @@ -15,5 +15,5 @@ $(GHC) -o $@ --make -optl-Wl,-dead_strip $< clean: - -rm uniqsort *.o *.hi + rm -f uniqsort *.o *.hi |
From: Andre P. <at...@us...> - 2005-08-06 16:40:15
|
Update of /cvsroot/hoc/hoc/installer-package In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19468 Added Files: Makefile Log Message: Added a convenience Makefile to the installer-package/ directory --- NEW FILE: Makefile --- packagemaker-open: open *.pmproj clean: -rm -rf root HOC.pkg |
From: Andre P. <at...@us...> - 2005-08-06 16:38:29
|
Update of /cvsroot/hoc/hoc/Foundation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18907/Foundation Modified Files: .cvsignore Makefile.in Log Message: Change register-inplace target so that it doesn't attempt to update inplace.conf if it's up-to-date. This fixes the long-standing annoyance that inplace.conf will be owned by root if 'sudo make install' is invoked. Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/Foundation/Makefile.in,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.in 6 Aug 2005 16:29:11 -0000 1.15 +++ Makefile.in 6 Aug 2005 16:38:20 -0000 1.16 @@ -7,12 +7,13 @@ Makefile.in \ $(NULL) -all: libHSFoundation.a HSFoundation.o register-inplace +all: libHSFoundation.a HSFoundation.o register-inplace.build-stamp -register-inplace: Foundation.conf-inplace +register-inplace.build-stamp: Foundation.conf-inplace [ -f "../inplace.conf" ] || echo '[]' > ../inplace.conf $(GHC_PKG) update Foundation.conf-inplace \ --package-conf=../inplace.conf + touch $@ exposed-modules.txt: find build/imports | grep '\.hi' \ @@ -72,7 +73,8 @@ clean: rm -rf build libHSFoundation.a libHSFoundation_dyn.dylib \ HSFoundation.o Foundation.hs Foundation ghcmake.build-stamp \ - exposed-modules.txt Foundation.conf Foundation.conf-inplace + exposed-modules.txt Foundation.conf Foundation.conf-inplace \ + register-inplace.build-stamp install: install-files ranlib "$(destdir)"/$(GHC_LIB_PATH)/Foundation/libHSFoundation.a Index: .cvsignore =================================================================== RCS file: /cvsroot/hoc/hoc/Foundation/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- .cvsignore 31 Mar 2005 16:37:57 -0000 1.2 +++ .cvsignore 6 Aug 2005 16:38:20 -0000 1.3 @@ -5,3 +5,5 @@ Makefile Foundation-macos.conf Foundation.conf +register-inplace.build-stamp + |
From: Andre P. <at...@us...> - 2005-08-06 16:38:29
|
Update of /cvsroot/hoc/hoc/AppKit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18907/AppKit Modified Files: .cvsignore Makefile.in Log Message: Change register-inplace target so that it doesn't attempt to update inplace.conf if it's up-to-date. This fixes the long-standing annoyance that inplace.conf will be owned by root if 'sudo make install' is invoked. Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/AppKit/Makefile.in,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Makefile.in 6 Aug 2005 16:29:11 -0000 1.16 +++ Makefile.in 6 Aug 2005 16:38:20 -0000 1.17 @@ -7,12 +7,13 @@ Makefile.in \ $(NULL) -all: libHSAppKit.a HSAppKit.o register-inplace +all: libHSAppKit.a HSAppKit.o register-inplace.build-stamp -register-inplace: AppKit.conf-inplace +register-inplace.build-stamp: AppKit.conf-inplace [ -f "../inplace.conf" ] || echo '[]' > ../inplace.conf $(GHC_PKG) update AppKit.conf-inplace \ --package-conf=../inplace.conf + touch $@ exposed-modules.txt: find build/imports | grep '\.hi' \ @@ -79,7 +80,8 @@ clean: rm -rf build libHSAppKit.a libHSAppKit_dyn.dylib HSAppKit.o \ AppKit.hs AppKit Cocoa.hs ghcmake.build-stamp \ - exposed-modules.txt AppKit.conf AppKit.conf-inplace + exposed-modules.txt AppKit.conf AppKit.conf-inplace \ + register-inplace.build-stamp install: install-files ranlib "$(destdir)"/$(GHC_LIB_PATH)/AppKit/libHSAppKit.a Index: .cvsignore =================================================================== RCS file: /cvsroot/hoc/hoc/AppKit/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- .cvsignore 31 Mar 2005 16:37:57 -0000 1.2 +++ .cvsignore 6 Aug 2005 16:38:20 -0000 1.3 @@ -2,6 +2,7 @@ Makefile exposed-modules.txt ghcmake.build-stamp - AppKit.conf AppKit.conf-inplace +register-inplace.build-stamp + |
From: Andre P. <at...@us...> - 2005-08-06 16:29:50
|
Update of /cvsroot/hoc/hoc/Foundation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17598/Foundation Modified Files: Makefile.in Log Message: Don't re-make libFoundation.a and libAppKit.a if they're up-to-date Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/Foundation/Makefile.in,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Makefile.in 4 Aug 2005 00:23:10 -0000 1.14 +++ Makefile.in 6 Aug 2005 16:29:11 -0000 1.15 @@ -32,8 +32,6 @@ @HOC_DEFINES@ Foundation.conf.in | grep -v '^#' > $@ cat exposed-modules.txt >> Foundation.conf -ghcmake: ghcmake.build-stamp - ghcmake.build-stamp: ln -sf ../Bindings/ifgen-output/Foundation.hs . ln -sf ../Bindings/ifgen-output/Foundation . @@ -63,10 +61,10 @@ HSFoundation.o: ghcmake.build-stamp find build/objects/ -name \*.o | xargs ld -r -x -o HSFoundation.o -libHSFoundation.a: ghcmake +libHSFoundation.a: ghcmake.build-stamp find build/objects/ -name \*.o | xargs $(MAKE_STATIC_LIB) libHSFoundation.a -libHSFoundation_dyn.dylib: ghcmake +libHSFoundation_dyn.dylib: ghcmake.build-stamp export MACOSX_DEPLOYMENT_TARGET=10.3 && find build/objects/ -name \*.o \ | xargs libtool -dynamic -o $@ -undefined dynamic_lookup install_name_tool -id "`pwd`/$@" $@ |
From: Andre P. <at...@us...> - 2005-08-06 16:29:48
|
Update of /cvsroot/hoc/hoc/AppKit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17598/AppKit Modified Files: Makefile.in Log Message: Don't re-make libFoundation.a and libAppKit.a if they're up-to-date Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/AppKit/Makefile.in,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.in 4 Aug 2005 00:23:10 -0000 1.15 +++ Makefile.in 6 Aug 2005 16:29:11 -0000 1.16 @@ -32,8 +32,6 @@ @HOC_DEFINES@ AppKit.conf.in | grep -v '^#' > $@ cat exposed-modules.txt >> AppKit.conf -ghcmake: ghcmake.build-stamp - ghcmake.build-stamp: ln -sf ../Bindings/ifgen-output/Cocoa.hs . ln -sf ../Bindings/ifgen-output/AppKit.hs . @@ -70,10 +68,10 @@ HSAppKit.o: ghcmake.build-stamp find build/objects/ -name \*.o | xargs ld -r -x -o HSAppKit.o -libHSAppKit.a: ghcmake +libHSAppKit.a: ghcmake.build-stamp find build/objects/ -name \*.o | xargs $(MAKE_STATIC_LIB) libHSAppKit.a -libHSAppKit_dyn.dylib: ghcmake +libHSAppKit_dyn.dylib: ghcmake.build-stamp export MACOSX_DEPLOYMENT_TARGET=10.3 && find build/objects/ -name \*.o \ | xargs libtool -dynamic -o $@ -undefined dynamic_lookup install_name_tool -id "`pwd`/$@" $@ |
From: Andre P. <at...@us...> - 2005-08-06 16:23:57
|
Update of /cvsroot/hoc/hoc/HOC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16811 Modified Files: .cvsignore Log Message: Improved CVS ignorance Index: .cvsignore =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- .cvsignore 1 Apr 2005 03:00:05 -0000 1.3 +++ .cvsignore 6 Aug 2005 16:23:44 -0000 1.4 @@ -3,4 +3,6 @@ Makefile HOC-macos.conf libHOC_dyn.dylib +HOC.conf +HOC.conf-inplace |
From: Andre P. <at...@us...> - 2005-08-06 16:22:44
|
Update of /cvsroot/hoc/hoc/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16590 Modified Files: Mapping_Types.pod Log Message: Added documentation on marshalling enums. (Wolfgang, you probably want to check this to see if it's all correct!) Index: Mapping_Types.pod =================================================================== RCS file: /cvsroot/hoc/hoc/docs/Mapping_Types.pod,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Mapping_Types.pod 19 May 2004 15:59:28 -0000 1.6 +++ Mapping_Types.pod 6 Aug 2005 16:22:31 -0000 1.7 @@ -213,9 +213,56 @@ =head3 C<enum> Types -This section is not written yet: please write to the I<hoc-users> -mailing list (see L<http://hoc.sourceforge.net/support.html>) for -assistance or, have a look at the HOC source code yourself. +C enum types are marshalled, but with a couple of twists. If the +enum is I<named>, a data declaration is created that is the same +name as the enum, with each of its constructors corresponding to +one of the enum definitions. A value ("constant function") will +also be created for each enum definition, with the first letter +and the initial "NS" lowercased, if that's present. The Haskell +data type will belong to the C<Eq>, C<Ord>, C<Read>, C<Show>, and +and C<HOC.CEnum> type classes. If you need to use the literal +integer value of the enum, use the C<HOC.fromCEnum> and +C<HOC.toCEnum> functions. + +Since that's all a bit abstract, an example will hopefully make +things much clearer! The following C enum declaration: + + typedef enum _MyEnum { + Foo = 0, + Bar = 42, + NSBaz, + NSQuux = 69 + } MyEnum; + +will be marshalled to the following Haskell declarations: + + data MyEnum = Foo | Bar | NSBaz | NSQuux + deriving (Eq, Ord, Read, Show) + + instance CEnum MyEnum where + fromCEnum Foo = 0 + fromCEnum Bar = 42 + fromCEnum NSBaz = 43 + fromCEnum NSQuux = 69 + toCEnum 0 = Foo + toCEnum 42 = Bar + toCEnum 43 = NSBaz + toCEnum 69 = NSQuux + + foo = Foo + bar = Bar + nsbaz = NSBaz + nsquux = NSQuux + +On the other hand, I<anonymous enums> are marshalled to simple +values only. The following example anonymous C enum: + + enum { NSFoo = 1, Bar = 3 } + +will be marshalled to: + + nsfoo = 1 + bar = 3 =head3 C<struct> Types |
From: Andre P. <at...@us...> - 2005-08-06 15:37:17
|
Update of /cvsroot/hoc/hoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8978 Added Files: CHANGES.txt Log Message: Added new CHANGES.txt file, detailing major changes between HOC releases --- NEW FILE: CHANGES.txt --- The following are significant changes between HOC versions. (This is not a full ChangeLog; see the CVS repository for that.) HOC 0.8 ======= * GHC 6.4 required to build * Binary installer available for Mac OS X * Removed experimental dylib support * Major code size reductions of HOC executables (~40% smaller) * Can send messages to super: [super foo]" in Objective-C is "super self # foo" in Haskell * Objective-C BOOL values are now properly marshalled as signed chars, not ints * Struct return values now work * Enum marshalling support: see the documentation for details * Updated documentation HOC 0.7 ======= * Initial release with typed API |
From: Andre P. <at...@us...> - 2005-08-06 15:36:50
|
Update of /cvsroot/hoc/hoc/installer-package In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8920 Added Files: Introduction.rtf Log Message: Added an introduction screen for the HOC binary installer --- NEW FILE: Introduction.rtf --- {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf100 {\fonttbl\f0\fnil\fcharset77 LucidaGrande;\f1\fmodern\fcharset77 Courier;} {\colortbl;\red255\green255\blue255;} {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid1} {\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid2}} {\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}} {\info {\author Andr\'8e Pang}}\paperw11900\paperh16840\margl1440\margr1440\vieww7760\viewh10020\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural \f0\fs24 \cf0 Welcome to the Mac OS X installer for HOC: A Haskell to Objective-C Binding. You will be guided through the steps necessary to install this software.\ \ Requirements:\ \ \pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\ql\qnatural\pardirnatural \ls1\ilvl0\cf0 {\listtext \'a5 }Mac OS X 10.4.1 (Tiger). If you are running Mac OS X 10.3 (Panther) or 10.2 (Jaguar), you will need to download and compile and compile the {\field{\*\fldinst{HYPERLINK "http://hoc.sourceforge.net/download.html"}}{\fldrslt HOC source code}} manually. This installer may work with other versions of Tiger other than 10.4.1; if it works for you and you're not running 10.4.1, please let us know!\ {\listtext \'a5 }The official GHC 6.4 binary distribution (packaged by Wolfgang Thaller), available at <{\field{\*\fldinst{HYPERLINK "http://www.haskell.org/ghc/download_ghc_64.html"}}{\fldrslt http://www.haskell.org/ghc/download_ghc_64.html}}>. If you have installed GHC via Fink, DarwinPorts or compiled it yourself, you will need to download and compile the {\field{\*\fldinst{HYPERLINK "http://hoc.sourceforge.net/download.html"}}{\fldrslt HOC source code}} manually.\ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural \cf0 \ Installation notes:\ \ \pard\tx220\tx720\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li720\fi-720\ql\qnatural\pardirnatural \ls2\ilvl0\cf0 {\listtext \'a5 }Documentation and examples will be installed to the \f1 /Applications/Glasgow Haskell Compiler 6.4/HOC/ \f0 folder.\ {\listtext \'a5 }The \f1 hocwrap \f0 executable will be installed to the \f1 /usr/local/bin/ \f0 directory.\ \ Enjoy!\ } |
From: Andre P. <at...@us...> - 2005-08-06 15:35:55
|
Update of /cvsroot/hoc/hoc/installer-package In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8799 Modified Files: HOC.pmproj LICENSE.rtf Log Message: Updated installer project and installer license notice Index: HOC.pmproj =================================================================== RCS file: /cvsroot/hoc/hoc/installer-package/HOC.pmproj,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 Binary files /tmp/cvsnlgI1k and /tmp/cvs1tt60L differ Index: LICENSE.rtf =================================================================== RCS file: /cvsroot/hoc/hoc/installer-package/LICENSE.rtf,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- LICENSE.rtf 30 Jul 2005 08:24:44 -0000 1.1 +++ LICENSE.rtf 6 Aug 2005 15:35:43 -0000 1.2 @@ -2,7 +2,7 @@ {\fonttbl\f0\fnil\fcharset77 LucidaGrande-Bold;\f1\fnil\fcharset77 LucidaGrande;} {\colortbl;\red255\green255\blue255;} {\info -{\author Andr\'8e Pang}}\paperw11900\paperh16840\margl1440\margr1440\vieww7740\viewh9160\viewkind0 +{\author Andr\'8e Pang}}\paperw11900\paperh16840\margl1440\margr1440\vieww7740\viewh9180\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural \f0\b\fs24 \cf0 HOC: A Haskell to Objective-C Binding\ @@ -11,9 +11,9 @@ Copyright (C) 2003-2005 Wolfgang Thaller\ Copyright (C) 2004-2005 Andre Pang\ \ -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\ +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\ \ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\ \ -THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR(s) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\ +THE SOFTWARE IS PROVIDED "AS IS'", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR(s) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\ } \ No newline at end of file |
From: Wolfgang T. <wth...@us...> - 2005-08-04 00:23:19
|
Update of /cvsroot/hoc/hoc/Foundation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2749/Foundation Modified Files: Foundation.conf.in Makefile.in Log Message: Avoid listing the main AppKit or Foundation module twice in the exposed-modules list. Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/Foundation/Makefile.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Makefile.in 3 Aug 2005 01:48:51 -0000 1.13 +++ Makefile.in 4 Aug 2005 00:23:10 -0000 1.14 @@ -16,7 +16,7 @@ exposed-modules.txt: find build/imports | grep '\.hi' \ - | sed 's@build/imports/@ ,@g' | sed 's/\.hi//g' | sed 's@/@.@g' \ + | sed 's@build/imports/@ @g' | sed 's/\.hi//g' | sed 's@/@.@g' \ > exposed-modules.txt Foundation.conf-inplace: Foundation.conf.in exposed-modules.txt Index: Foundation.conf.in =================================================================== RCS file: /cvsroot/hoc/hoc/Foundation/Foundation.conf.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Foundation.conf.in 18 Apr 2005 00:45:42 -0000 1.1 +++ Foundation.conf.in 4 Aug 2005 00:23:10 -0000 1.2 @@ -15,5 +15,3 @@ depends: HOC exposed-modules: - Foundation - |
From: Wolfgang T. <wth...@us...> - 2005-08-04 00:23:19
|
Update of /cvsroot/hoc/hoc/AppKit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2749/AppKit Modified Files: AppKit.conf.in Makefile.in Log Message: Avoid listing the main AppKit or Foundation module twice in the exposed-modules list. Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/AppKit/Makefile.in,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Makefile.in 3 Aug 2005 02:34:22 -0000 1.14 +++ Makefile.in 4 Aug 2005 00:23:10 -0000 1.15 @@ -16,7 +16,7 @@ exposed-modules.txt: find build/imports | grep '\.hi' \ - | sed 's@build/imports/@ ,@g' | sed 's/\.hi//g' | sed 's@/@.@g' \ + | sed 's@build/imports/@ @g' | sed 's/\.hi//g' | sed 's@/@.@g' \ > exposed-modules.txt AppKit.conf-inplace: AppKit.conf.in exposed-modules.txt Index: AppKit.conf.in =================================================================== RCS file: /cvsroot/hoc/hoc/AppKit/AppKit.conf.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- AppKit.conf.in 18 Apr 2005 00:45:43 -0000 1.1 +++ AppKit.conf.in 4 Aug 2005 00:23:10 -0000 1.2 @@ -23,6 +23,3 @@ depends: HOC, Foundation exposed-modules: - AppKit - - |
From: Wolfgang T. <wth...@us...> - 2005-08-03 18:02:52
|
Update of /cvsroot/hoc/hoc/HOC_cbits In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30167 Modified Files: Makefile.in Log Message: Unbreak the makefile for HOC_cbits: we really need ar qs rather than libtool here, as we are taking a copy of libffi and adding more files. Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/HOC_cbits/Makefile.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.in 3 Aug 2005 01:48:52 -0000 1.7 +++ Makefile.in 3 Aug 2005 18:02:43 -0000 1.8 @@ -37,7 +37,7 @@ libHOC_cbits.a: $(OBJS) cp ../libffi-src/build/.libs/libffi.a libHOC_cbits.a - $(MAKE_STATIC_LIB) libHOC_cbits.a $(OBJS) + ar qs libHOC_cbits.a $(OBJS) libHOC_cbits_dyn.dylib: libHOC_cbits.a export MACOSX_DEPLOYMENT_TARGET=10.3 && \ |
From: Wolfgang T. <wth...@us...> - 2005-08-03 02:34:31
|
Update of /cvsroot/hoc/hoc/AppKit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17378 Modified Files: Makefile.in Log Message: install depends on install-files Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/AppKit/Makefile.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Makefile.in 3 Aug 2005 01:48:51 -0000 1.13 +++ Makefile.in 3 Aug 2005 02:34:22 -0000 1.14 @@ -83,7 +83,7 @@ AppKit.hs AppKit Cocoa.hs ghcmake.build-stamp \ exposed-modules.txt AppKit.conf AppKit.conf-inplace -install: +install: install-files ranlib "$(destdir)"/$(GHC_LIB_PATH)/AppKit/libHSAppKit.a ghc-pkg --update-package --input-file=AppKit.conf |
From: Wolfgang T. <wth...@us...> - 2005-08-03 01:52:14
|
Update of /cvsroot/hoc/hoc/InterfaceGenerator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11498/InterfaceGenerator Modified Files: Headers.hs Log Message: Fix indentation in Headers.stripPreprocessor Index: Headers.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/Headers.hs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Headers.hs 18 Apr 2005 01:37:22 -0000 1.5 +++ Headers.hs 3 Aug 2005 01:52:03 -0000 1.6 @@ -17,12 +17,12 @@ stripPreprocessor = unlines . stripPP . lines where - stripPP (x@('#':_) : xs) = dropPreprocessorLine x xs - stripPP (x : xs) = x : stripPP xs - stripPP [] = [] - dropPreprocessorLine x xs - | last x == '\\' = "" : dropPreprocessorLine (head xs) (tail xs) - | otherwise = "" : stripPP xs + stripPP (x@('#':_) : xs) = dropPreprocessorLine x xs + stripPP (x : xs) = x : stripPP xs + stripPP [] = [] + dropPreprocessorLine x xs + | last x == '\\' = "" : dropPreprocessorLine (head xs) (tail xs) + | otherwise = "" : stripPP xs findImports = mapMaybe checkImport . lines where |
From: Wolfgang T. <wth...@us...> - 2005-08-03 01:49:04
|
Update of /cvsroot/hoc/hoc/HOC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10800/HOC Modified Files: Makefile.in Log Message: Enable -O -fasm; ... and clean up the makefiles, remove stray -fPIC flags and vestiges of dynamic linking experiments (this should be re-added using an optional configure flag in the future). Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/Makefile.in,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.in 30 Jul 2005 08:24:43 -0000 1.15 +++ Makefile.in 3 Aug 2005 01:48:51 -0000 1.16 @@ -11,7 +11,7 @@ Makefile.in \ $(NULL) -all: libHOC.a libHOC_dyn.dylib HOC.o ../inplace.conf +all: libHOC.a HOC.o ../inplace.conf ../inplace.conf: HOC.conf-inplace [ -f "$@" ] || echo '[]' > $@ @@ -54,7 +54,6 @@ mkdir -p build/objects mkdir -p build/imports $(GHC) --make HOC/Arguments.hs \ - -fPIC -dynamic \ -odir build/objects -hidir build/imports \ -fglasgow-exts -fth \ ../HOC_cbits/HOC_cbits.o \ @@ -65,7 +64,7 @@ $(FOUNDATION_LIBS) \ $(DEFINES) $(GHC) --make HOC.hs \ - -fPIC -dynamic \ + -O -fasm \ -odir build/objects -hidir build/imports \ -fglasgow-exts -fth \ ../HOC_cbits/HOC_cbits.o \ @@ -88,6 +87,5 @@ install-files: all HOC.conf mkdir -p "$(destdir)"/$(GHC_LIB_PATH)/HOC - cp -R libHOC.a libHOC_dyn.dylib HOC.o build/imports \ + cp -R libHOC.a HOC.o build/imports \ "$(destdir)"/$(GHC_LIB_PATH)/HOC/ - |
From: Wolfgang T. <wth...@us...> - 2005-08-03 01:49:04
|
Update of /cvsroot/hoc/hoc/AppKit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10800/AppKit Modified Files: Makefile.in Log Message: Enable -O -fasm; ... and clean up the makefiles, remove stray -fPIC flags and vestiges of dynamic linking experiments (this should be re-added using an optional configure flag in the future). Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/AppKit/Makefile.in,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.in 30 Jul 2005 08:24:42 -0000 1.12 +++ Makefile.in 3 Aug 2005 01:48:51 -0000 1.13 @@ -45,6 +45,7 @@ mkdir -p build/objects mkdir -p build/imports $(GHC) --make AppKit.hs \ + -O -fasm \ -ignore-package AppKit \ -odir build/objects \ -hidir build/imports \ @@ -58,7 +59,6 @@ -package-conf ../inplace.conf \ -fglasgow-exts $(GHC) -c Cocoa.hs \ - -fPIC -dynamic \ -ignore-package AppKit \ -ibuild/imports \ -o build/objects/Cocoa.o \ @@ -71,18 +71,13 @@ find build/objects/ -name \*.o | xargs ld -r -x -o HSAppKit.o libHSAppKit.a: ghcmake - find build/objects/ -name \*.o | xargs libtool -static -o libHSAppKit.a + find build/objects/ -name \*.o | xargs $(MAKE_STATIC_LIB) libHSAppKit.a libHSAppKit_dyn.dylib: ghcmake export MACOSX_DEPLOYMENT_TARGET=10.3 && find build/objects/ -name \*.o \ | xargs libtool -dynamic -o $@ -undefined dynamic_lookup install_name_tool -id "`pwd`/$@" $@ -#libHSAppKit.a: HSAppKit.o -# rm -f libHSAppKit.a -# ar cq libHSAppKit.a HSAppKit.o -# ranlib libHSAppKit.a - clean: rm -rf build libHSAppKit.a libHSAppKit_dyn.dylib HSAppKit.o \ AppKit.hs AppKit Cocoa.hs ghcmake.build-stamp \ |