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: Andre P. <at...@us...> - 2005-03-31 15:41:35
|
Update of /cvsroot/hoc/hoc/HOC/HOC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25052/HOC/HOC Added Files: .cvsignore Log Message: Added .cvsignore files, so I can grok 'cvs update' output --- NEW FILE: .cvsignore --- NewClass_stub.c NewClass_stub.h |
From: Andre P. <at...@us...> - 2005-03-31 15:41:34
|
Update of /cvsroot/hoc/hoc/HOC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25052/HOC Added Files: .cvsignore Log Message: Added .cvsignore files, so I can grok 'cvs update' output --- NEW FILE: .cvsignore --- build ghcmake.build-stamp Makefile |
From: Andre P. <at...@us...> - 2005-03-31 15:41:33
|
Update of /cvsroot/hoc/hoc/Foundation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25052/Foundation Added Files: .cvsignore Log Message: Added .cvsignore files, so I can grok 'cvs update' output --- NEW FILE: .cvsignore --- build exposed-modules.txt Foundation.conf-inplace ghcmake.build-stamp Makefile |
From: Andre P. <at...@us...> - 2005-03-31 15:41:33
|
Update of /cvsroot/hoc/hoc/Bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25052/Bindings Added Files: .cvsignore Log Message: Added .cvsignore files, so I can grok 'cvs update' output --- NEW FILE: .cvsignore --- all-selectors.txt ifgen-output ifgen-output.txt Makefile |
From: Andre P. <at...@us...> - 2005-03-31 15:41:32
|
Update of /cvsroot/hoc/hoc/AppKit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25052/AppKit Added Files: .cvsignore Log Message: Added .cvsignore files, so I can grok 'cvs update' output --- NEW FILE: .cvsignore --- build Makefile |
From: Andre P. <at...@us...> - 2005-03-31 15:41:31
|
Update of /cvsroot/hoc/hoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25052 Added Files: .cvsignore Log Message: Added .cvsignore files, so I can grok 'cvs update' output --- NEW FILE: .cvsignore --- autom4te.cache config.log config.mk config.status configure hoc-0.7 hoc-0.7.tar.bz2 inplace.conf Makefile |
From: Andre P. <at...@us...> - 2005-03-31 15:35:38
|
Update of /cvsroot/hoc/hoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21583 Modified Files: README.txt Log Message: Introducing README.txt! Index: README.txt =================================================================== RCS file: /cvsroot/hoc/hoc/README.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- README.txt 17 May 2004 18:42:32 -0000 1.1 +++ README.txt 31 Mar 2005 15:35:23 -0000 1.2 @@ -0,0 +1,73 @@ +About HOC +========= + +HOC is a Haskell to Objective-C binding. In a nutshell, it enables you to +use Objective-C objects and frameworks from Haskell, and also enables you +to write Objective-C objects in Haskell. + +The Haskell interfaces produced by HOC are: + +* Typed: Take advantage of Haskell's sound type inferenceto help you + develop robust, correct Cocoa/GNUstep applications on your first + compile. + +* Automatically Generated: HOC comes with an interface generator to + generate Haskell bindings to Objective-C's objects; use it even with + your own custom Objective-C frameworks! + +* Haskell-Friendly: We make heavy use of key Haskell features such as + type classes and partial application, to ensure that the HOC API is as + 'Haskell-like' as possible. + +You can use HOC to write full-blown GUI applications using Mac OS X's +advanced Cocoa framework. + +For more information on HOC, see its homepage, at: + + http://hoc.sourceforge.net/ + + +Building HOC +============ + +Like many Haskell libraries, HOC ships in source form only: binaries are +not provided because of the dizzying number of configurations of GHC and +target platforms (Mac OS X 10.2, 10.3, or various Linux & GNUstep +platforms). You'll thus have to build HOC from source code. + +(Note: If you have checked out HOC from CVS, see the BUILDING.CVS file for +build instructions instead of this.) + +HOC uses GNU autoconf for its build system, so building HOC should be +a simple matter of the standard autoconf build mantra: + + ./configure + make + make install + +If you have a problem building HOC, please check the "Requirements" +section in the docs/HOC.html file to make sure that you have all the Good +Stuff required for HOC to build properly. If you've got everything you +need and HOC still doesn't work, this is a _bug_ -- please see the support +page at http://hoc.sourceforge.net/support.html, and contact one of the +HOC developers to help you out. Chances are that a few other people have +run into the same problems as you! + +HOC should automatically locate where GHC is on your system, but if you +want to specify what command it should use to run GHC, HOC's ./configure +script takes a few extra flags you'll be interested in: + + --with-ghc=... command to run ghc (e.g. $HOME/bin/ghc-6.4) + --with-ghc-pkg=... command to run ghc-pkg (e.g. $HOME/bin/ghc-pkg-6.4) + +Note that HOC will install itself to GHC's library directory (which you +can find out yourself with `ghc --print-libdir`), so you'll need the +appropriate permissions to write to there during the 'make install'. + + +Authors +======= + +Wolfgang Thaller <wol...@gm...> +Andre Pang <oz...@al...> + |
From: Andre P. <at...@us...> - 2005-03-31 15:34:37
|
Update of /cvsroot/hoc/hoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21221 Modified Files: configure.ac Log Message: Require GHC 6.4 in ./configure Index: configure.ac =================================================================== RCS file: /cvsroot/hoc/hoc/configure.ac,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- configure.ac 6 Dec 2004 03:46:49 -0000 1.8 +++ configure.ac 31 Mar 2005 15:34:28 -0000 1.9 @@ -43,7 +43,7 @@ # AC_ARG_WITH(ghc, - [ --with-ghc=... command to run ghc (e.g. $HOME/bin/ghc-6.2.1)], + [ --with-ghc=... command to run ghc (e.g. $HOME/bin/ghc-6.4)], [GHC=$withval]) if test -z "$GHC"; then @@ -60,13 +60,13 @@ ghc_minor=`echo "$ghc_version" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p'` changequote([, ]) AC_MSG_RESULT([$ghc_version]) - if test '(' "$ghc_major" -ge 6 -a "$ghc_minor" -ge 3 ')' -o \ + if test '(' "$ghc_major" -ge 6 -a "$ghc_minor" -ge 4 ')' -o \ '(' "$ghc_major" -gt 6 ')'; then AC_MSG_CHECKING([for ghc library directory]) GHC_LIB_PATH=`$GHC --print-libdir` AC_MSG_RESULT([$GHC_LIB_PATH]) else - AC_MSG_ERROR([** Sorry, your GHC is too old. GHC >= 6.3 (Dec. 04 snapshot) required.]) + AC_MSG_ERROR([** Sorry, your GHC is too old. GHC >= 6.4 required.]) GHC="" fi else @@ -78,7 +78,7 @@ # Check for ghc-pkg AC_ARG_WITH(ghc-pkg, - [ --with-ghc-pkg=... command to run ghc-pkg (e.g. $HOME/bin/ghc-pkg-6.2.1)], + [ --with-ghc-pkg=... command to run ghc-pkg (e.g. $HOME/bin/ghc-pkg-6.4)], [GHC_PKG="$withval"]) if test -n "$GHC_PKG"; then |
From: Andre P. <at...@us...> - 2005-03-31 15:30:31
|
Update of /cvsroot/hoc/hoc/HOC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18523/HOC Modified Files: HOC-macos.conf HOC-macos.conf-inplace HOC.hs Makefile.in Log Message: Get HOC/ and InterfaceGenerator/ subdirectories compiling with GHC 6.4 Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/Makefile.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.in 6 Dec 2004 03:46:51 -0000 1.7 +++ Makefile.in 31 Mar 2005 15:30:18 -0000 1.8 @@ -14,7 +14,7 @@ all: libHOC.a HOC.o ../inplace.conf ../inplace.conf: HOC-$(PLATFORM).conf-inplace - $(GHC_PKG) unregister --force --package-conf=../inplace.conf HOC || true + echo "[]" > $@ $(GHC_PKG) register HOC-$(PLATFORM).conf-inplace \ --package-conf=../inplace.conf @@ -30,12 +30,28 @@ ghcmake: ghcmake.build-stamp + +# XXX: GHC 6.4 has a really ... _weird_ bug where it won't compile +# HOC/StdArgumentTypes.hs properly if you just try ghc --make with HOC.hs. +# There seems to be a problem with GHC's .hi file chasing with +# HOC/Arguments.hs; obviously the long-term solution is to fix GHC, but for +# now, we work around it by compiling HOC/Arguments.hs first. ghcmake.build-stamp: mkdir -p build/objects mkdir -p build/imports + $(GHC) --make HOC/Arguments.hs \ + -odir build/objects -hidir build/imports \ + -fglasgow-exts -fth \ + ../HOC_cbits/HOC_cbits.o \ + -I../HOC_cbits \ + -I../libffi-src/build/include \ + -ignore-package HOC \ + $(FOUNDATION_INCLUDES) \ + $(FOUNDATION_LIBS) \ + $(DEFINES) $(GHC) --make HOC.hs \ -odir build/objects -hidir build/imports \ - -fglasgow-exts \ + -fglasgow-exts -fth \ ../HOC_cbits/HOC_cbits.o \ -I../HOC_cbits \ -I../libffi-src/build/include \ Index: HOC.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- HOC.hs 12 May 2004 05:44:10 -0000 1.6 +++ HOC.hs 31 Mar 2005 15:30:18 -0000 1.7 @@ -38,7 +38,7 @@ objectMapStatistics, -- things that shouldn't really be exported - InstanceVariables(..), + InstanceVariables, Typeable(..) ) where Index: HOC-macos.conf =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC-macos.conf,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- HOC-macos.conf 6 Dec 2004 03:46:51 -0000 1.4 +++ HOC-macos.conf 31 Mar 2005 15:30:17 -0000 1.5 @@ -26,6 +26,6 @@ library-dirs: "$libdir/HOC" hs-libraries: "HOC", "HOC_cbits" -extra-libs: "objc" -extra-frameworks: "Foundation" +extra-libraries: "objc" +frameworks: "Foundation" depends: base, template-haskell Index: HOC-macos.conf-inplace =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC-macos.conf-inplace,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- HOC-macos.conf-inplace 6 Dec 2004 03:46:51 -0000 1.4 +++ HOC-macos.conf-inplace 31 Mar 2005 15:30:18 -0000 1.5 @@ -27,7 +27,8 @@ "../HOC_cbits" hs-libraries: "HOC", "HOC_cbits" -extra-libs: "objc" -extra-frameworks: "Foundation" +extra-libraries: "objc" +frameworks: "Foundation" + depends: base, template-haskell |
From: Andre P. <at...@us...> - 2005-03-31 15:30:31
|
Update of /cvsroot/hoc/hoc/InterfaceGenerator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18523/InterfaceGenerator Modified Files: BindingScript.hs ExportModule.hs Main.hs PrepareDeclarations.hs Log Message: Get HOC/ and InterfaceGenerator/ subdirectories compiling with GHC 6.4 Index: ExportModule.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/ExportModule.hs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ExportModule.hs 5 Apr 2004 00:04:46 -0000 1.4 +++ ExportModule.hs 31 Mar 2005 15:30:19 -0000 1.5 @@ -13,7 +13,7 @@ import Enums(enumName, pprEnumType) import NameCaseChange -import Data.Set +import Data.Set hiding (map, null, filter, partition, empty) import qualified Data.HashTable as HashTable import Data.List(nub, partition, isPrefixOf) import Data.Maybe(fromMaybe, catMaybes, mapMaybe, maybeToList, isNothing) Index: PrepareDeclarations.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/PrepareDeclarations.hs,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- PrepareDeclarations.hs 5 Apr 2004 00:04:46 -0000 1.9 +++ PrepareDeclarations.hs 31 Mar 2005 15:30:19 -0000 1.10 @@ -17,7 +17,7 @@ import HOC.SelectorNameMangling(mangleSelectorName) import Control.Monad(when) -import Data.Set +import Data.Set hiding (map) import Data.FiniteMap import qualified Data.HashTable as HashTable import Data.Maybe(maybeToList, fromMaybe, mapMaybe) @@ -53,11 +53,6 @@ } deriving(Show) -instance (Show key, Show elem) => Show (FiniteMap key elem) where - show = show . fmToList -instance (Show elem) => Show (Set elem) where - show = show . setToList - classInfoForDeclaration (moduleName, SelectorList (Interface name super protocols) methods) = Just $ (nameToUppercase name, ClassInfo { ciProtocol = False, Index: BindingScript.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/BindingScript.hs,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- BindingScript.hs 5 Apr 2004 00:04:46 -0000 1.7 +++ BindingScript.hs 31 Mar 2005 15:30:19 -0000 1.8 @@ -13,7 +13,7 @@ import Control.Monad(when) import Data.FiniteMap -import Data.Set +import Data.Set hiding (map, null) import Data.List(intersperse) import Text.ParserCombinators.Parsec.Language(haskellStyle) Index: Main.hs =================================================================== RCS file: /cvsroot/hoc/hoc/InterfaceGenerator/Main.hs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Main.hs 5 Apr 2004 00:04:46 -0000 1.5 +++ Main.hs 31 Mar 2005 15:30:19 -0000 1.6 @@ -6,7 +6,7 @@ import qualified Data.HashTable as HashTable import Data.List(isPrefixOf,isSuffixOf,partition) import Data.Maybe(fromMaybe,mapMaybe,isJust,isNothing,catMaybes,maybeToList) -import Data.Set +import Data.Set hiding (map, filter, null, partition, empty) import Control.Monad(unless) import System.Info(os) |
From: Wolfgang T. <wth...@us...> - 2004-12-06 03:47:18
|
Update of /cvsroot/hoc/hoc/Foundation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28748/Foundation Modified Files: Makefile.in Added Files: Foundation-macos.conf-inplace.in Foundation-macos.conf.in Removed Files: Foundation.conf Foundation.conf-inplace Log Message: Upgrade to GHC 6.3, recent snapshot. I'm sure there are more places in HOC.* where we can take advantage of TH 2.0's new features, and the Cabal-aware build system is still quite fragile. Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/Foundation/Makefile.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.in 17 May 2004 18:07:42 -0000 1.5 +++ Makefile.in 6 Dec 2004 03:46:50 -0000 1.6 @@ -7,7 +7,23 @@ Makefile.in \ $(NULL) -all: libHSFoundation.a HSFoundation.o +all: libHSFoundation.a HSFoundation.o ../inplace.conf + +../inplace.conf: Foundation.conf-inplace + $(GHC_PKG) unregister --force --package-conf=../inplace.conf Foundation || true + $(GHC_PKG) register Foundation.conf-inplace \ + --package-conf=../inplace.conf + +exposed-modules.txt: + find build/imports | grep '\.hi' \ + | sed 's@build/imports/@ ,@g' | sed 's/\.hi//g' | sed 's@/@.@g' \ + > exposed-modules.txt + +Foundation.conf-inplace: Foundation-$(PLATFORM).conf-inplace.in exposed-modules.txt + cat Foundation-$(PLATFORM).conf-inplace.in exposed-modules.txt > Foundation.conf-inplace + +Foundation.conf: Foundation-$(PLATFORM).conf.in exposed-modules.txt + cat Foundation-$(PLATFORM).conf.in exposed-modules.txt > Foundation.conf ghcmake: ghcmake.build-stamp @@ -21,40 +37,40 @@ mkdir -p build/objects mkdir -p build/imports $(GHC) --make Foundation.hs \ - -package-name Foundation \ -odir build/objects \ + -ignore-package Foundation \ -hidir build/imports \ - -package-conf ../HOC/HOC-$(PLATFORM).conf-inplace \ + -package-conf ../inplace.conf \ -fglasgow-exts + test ! -r GNUstepBase.hs || \ $(GHC) --make GNUstepBase.hs \ - -package-name Foundation \ + -ignore-package Foundation \ -odir build/objects \ -hidir build/imports \ - -package-conf ../HOC/HOC-$(PLATFORM).conf-inplace \ + -package-conf ../inplace.conf \ -fglasgow-exts touch $@ HSFoundation.o: ghcmake.build-stamp find build/objects/ -name \*.o | xargs ld -r -x -o HSFoundation.o -#libHSFoundation.a: ghcmake -# find build/objects/ -name \*.o | xargs libtool -static -o libHSFoundation.a +libHSFoundation.a: ghcmake + find build/objects/ -name \*.o | xargs libtool -static -o libHSFoundation.a -libHSFoundation.a: HSFoundation.o - rm -f libHSFoundation.a - ar cq libHSFoundation.a HSFoundation.o - ranlib libHSFoundation.a +#libHSFoundation.a: HSFoundation.o +# rm -f libHSFoundation.a +# ar cq libHSFoundation.a HSFoundation.o +# ranlib libHSFoundation.a clean: rm -rf build libHSFoundation.a HSFoundation.o Foundation.hs \ Foundation ghcmake.build-stamp -install: all +install: all Foundation.conf mkdir -p $(GHC_LIB_PATH)/Foundation cp -R libHSFoundation.a HSFoundation.o build/imports \ $(GHC_LIB_PATH)/Foundation/ ranlib $(GHC_LIB_PATH)/Foundation/libHSFoundation.a - $(GHC_PKG) --update-package \ - --input-file=Foundation.conf + $(GHC_PKG) register Foundation.conf --- NEW FILE: Foundation-macos.conf.in --- name: Foundation maintainer: wol...@gm... exposed: True import-dirs: "$libdir/Foundation/imports" library-dirs: "$libdir/Foundation/" hs-libraries: "HSFoundation" extra-frameworks: "Foundation" depends: HOC exposed-modules: Foundation --- Foundation.conf DELETED --- --- NEW FILE: Foundation-macos.conf-inplace.in --- name: Foundation maintainer: wol...@gm... exposed: True import-dirs: "../Foundation/build/imports" library-dirs: "../Foundation" hs-libraries: "HSFoundation" extra-frameworks: "Foundation" depends: HOC exposed-modules: Foundation --- Foundation.conf-inplace DELETED --- |
From: Wolfgang T. <wth...@us...> - 2004-12-06 03:47:13
|
Update of /cvsroot/hoc/hoc/HOC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28748/HOC Modified Files: HOC-macos.conf HOC-macos.conf-inplace Makefile.in Log Message: Upgrade to GHC 6.3, recent snapshot. I'm sure there are more places in HOC.* where we can take advantage of TH 2.0's new features, and the Cabal-aware build system is still quite fragile. Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/Makefile.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.in 18 May 2004 03:05:01 -0000 1.6 +++ Makefile.in 6 Dec 2004 03:46:51 -0000 1.7 @@ -11,7 +11,12 @@ Makefile.in \ $(NULL) -all: libHOC.a HOC.o +all: libHOC.a HOC.o ../inplace.conf + +../inplace.conf: HOC-$(PLATFORM).conf-inplace + $(GHC_PKG) unregister --force --package-conf=../inplace.conf HOC || true + $(GHC_PKG) register HOC-$(PLATFORM).conf-inplace \ + --package-conf=../inplace.conf libHOC.a: ghcmake.build-stamp find build/objects/ -name \*.o | xargs $(MAKE_STATIC_LIB) libHOC.a @@ -30,10 +35,11 @@ mkdir -p build/imports $(GHC) --make HOC.hs \ -odir build/objects -hidir build/imports \ - -fglasgow-exts -package-name HOC \ + -fglasgow-exts \ ../HOC_cbits/HOC_cbits.o \ -I../HOC_cbits \ -I../libffi-src/build/include \ + -ignore-package HOC \ $(FOUNDATION_INCLUDES) \ $(FOUNDATION_LIBS) \ $(DEFINES) @@ -49,5 +55,4 @@ cp -R libHOC.a HOC.o build/imports \ $(GHC_LIB_PATH)/HOC/ ranlib $(GHC_LIB_PATH)/HOC/libHOC.a - $(GHC_PKG) --update-package \ - --input-file=HOC-$(PLATFORM).conf + $(GHC_PKG) register HOC-$(PLATFORM).conf Index: HOC-macos.conf =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC-macos.conf,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- HOC-macos.conf 13 May 2004 11:08:33 -0000 1.3 +++ HOC-macos.conf 6 Dec 2004 03:46:51 -0000 1.4 @@ -1,18 +1,31 @@ -Package -{ - name = "HOC", - auto = True, - import_dirs = ["$libdir/HOC/imports"], - source_dirs = [], - library_dirs = ["$libdir/HOC"], - hs_libraries = ["HOC"], - extra_libraries = ["HOC_cbits"], - include_dirs = ["$libdir/HOC"], - c_includes = [], - package_deps = ["base","haskell-src"], - extra_ghc_opts = [], - extra_cc_opts = [], - extra_ld_opts = [], - framework_dirs = [], - extra_frameworks = ["Foundation"] -} +name: HOC +maintainer: wol...@gm... +exposed: True + +exposed-modules: + HOC, + HOC.SelectorNameMangling, + HOC.Arguments, + HOC.FFICallInterface, + HOC.StdArgumentTypes, + HOC.TH, + HOC.DeclareClass, + HOC.ID, + HOC.Class, + HOC.DeclareSelector, + HOC.SelectorMarshaller, + HOC.Base, + HOC.NewlyAllocated, + HOC.Invocation, + HOC.MsgSend, + HOC.Utilities, + HOC.ExportClass, + HOC.NewClass + +import-dirs: "$libdir/HOC/imports" +library-dirs: "$libdir/HOC" + +hs-libraries: "HOC", "HOC_cbits" +extra-libs: "objc" +extra-frameworks: "Foundation" +depends: base, template-haskell Index: HOC-macos.conf-inplace =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC-macos.conf-inplace,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- HOC-macos.conf-inplace 13 May 2004 18:04:41 -0000 1.3 +++ HOC-macos.conf-inplace 6 Dec 2004 03:46:51 -0000 1.4 @@ -1,20 +1,33 @@ -[ -Package -{ - name = "HOC", - auto = True, - import_dirs = ["../HOC/build/imports"], - source_dirs = [], - library_dirs = ["../HOC", "../HOC_cbits"], - hs_libraries = ["HOC"], - extra_libraries = ["HOC_cbits"], - include_dirs = ["../HOC_cbits"], - c_includes = [], - package_deps = ["base","haskell-src"], - extra_ghc_opts = [], - extra_cc_opts = [], - extra_ld_opts = [], - framework_dirs = [], - extra_frameworks = ["Foundation"] -} -] +name: HOC +maintainer: wol...@gm... +exposed: True + +exposed-modules: + HOC, + HOC.SelectorNameMangling, + HOC.Arguments, + HOC.FFICallInterface, + HOC.StdArgumentTypes, + HOC.TH, + HOC.DeclareClass, + HOC.ID, + HOC.Class, + HOC.DeclareSelector, + HOC.SelectorMarshaller, + HOC.Base, + HOC.NewlyAllocated, + HOC.Invocation, + HOC.MsgSend, + HOC.Utilities, + HOC.ExportClass, + HOC.NewClass + +import-dirs: "../HOC/build/imports" +library-dirs: "../HOC", + "../HOC_cbits" + +hs-libraries: "HOC", "HOC_cbits" +extra-libs: "objc" +extra-frameworks: "Foundation" +depends: base, template-haskell + |
From: Wolfgang T. <wth...@us...> - 2004-12-06 03:47:09
|
Update of /cvsroot/hoc/hoc/HOC/HOC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28748/HOC/HOC Modified Files: Arguments.hs Base.hs DeclareClass.hs DeclareSelector.hs ExportClass.hs SelectorMarshaller.hs Added Files: TH.hs Log Message: Upgrade to GHC 6.3, recent snapshot. I'm sure there are more places in HOC.* where we can take advantage of TH 2.0's new features, and the Cabal-aware build system is still quite fragile. Index: SelectorMarshaller.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC/SelectorMarshaller.hs,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- SelectorMarshaller.hs 6 Apr 2004 12:31:18 -0000 1.6 +++ SelectorMarshaller.hs 6 Dec 2004 03:46:51 -0000 1.7 @@ -1,4 +1,9 @@ -module HOC.SelectorMarshaller where +module HOC.SelectorMarshaller( + SelectorInfo(..), + makeMarshaller, + makeMarshallers, + marshallerName + ) where import HOC.Base import HOC.Arguments @@ -9,10 +14,11 @@ import HOC.MsgSend import HOC.FFICallInterface -import Language.Haskell.THSyntax import Foreign ( withArray, Ptr, nullPtr ) import System.IO.Unsafe ( unsafePerformIO ) +import HOC.TH + data SelectorInfo = SelectorInfo { selectorInfoObjCName :: String, selectorInfoHaskellName :: String, @@ -24,20 +30,22 @@ makeMarshaller maybeInfoName haskellName nArgs isUnit isPure isRetained = funD haskellName [ - clause (map VarP $ infoArgument ++ arguments - ++ ["target"]) + clause (map varP $ infoArgument ++ map mkName arguments + ++ [mkName "target"]) (normalB $ marshallerBody ) [] ] where (infoVar, infoArgument) = case maybeInfoName of Just name -> (varE name, []) - Nothing -> (varE "info", ["info"]) + Nothing -> (varE (mkName "info"), [mkName "info"]) arguments = [ "arg" ++ show i | i <- [1..nArgs] ] - argumentsToMarshal = varE "target" + argumentsToMarshal = varE (mkName "target") : [| selectorInfoSel $(infoVar) |] - : map varE arguments - marshalledArguments = "target'" : "selector'" : map (++"'") arguments + : map (varE.mkName) arguments + marshalledArguments = mkName "target'" + : mkName "selector'" + : map (mkName . (++"'")) arguments marshallerBody = purify $ checkTargetNil $ @@ -54,13 +62,13 @@ where e' = marshallArgs' args args' e collectArgs e = [| withArray $(listE (map varE marshalledArguments)) - $(lamE [varP "args"] e) |] + $(lamE [varP $ mkName "args"] e) |] invoke | isUnit = [| sendMessageWithoutRetval (selectorInfoCif $(infoVar)) $(argsVar)|] | otherwise = [| sendMessageWithRetval (selectorInfoCif $(infoVar)) $(argsVar)|] - where argsVar = varE "args" + where argsVar = varE $ mkName "args" purify e | isPure = [| unsafePerformIO $(e) |] | otherwise = e @@ -68,13 +76,13 @@ releaseRetvalIfRetained e | isRetained = [| $(e) >>= releaseExtraReference |] | otherwise = e - checkTargetNil e = [| failNilMessage $(varE "target") + checkTargetNil e = [| failNilMessage $(varE $ mkName "target") (selectorInfoHaskellName $(infoVar)) >> $(e) |] makeMarshallers n = sequence $ - [ makeMarshaller Nothing (marshallerName nArgs isUnit) nArgs isUnit False False + [ makeMarshaller Nothing (mkName $ marshallerName nArgs isUnit) nArgs isUnit False False | nArgs <- [0..n], isUnit <- [False, True] ] marshallerName nArgs False = "method" ++ show nArgs Index: DeclareSelector.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC/DeclareSelector.hs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- DeclareSelector.hs 2 Nov 2003 10:12:53 -0000 1.4 +++ DeclareSelector.hs 6 Dec 2004 03:46:51 -0000 1.5 @@ -1,5 +1,5 @@ module HOC.DeclareSelector where - + import HOC.Base import HOC.Arguments import HOC.Class @@ -9,12 +9,15 @@ import HOC.FFICallInterface import HOC.SelectorMarshaller import HOC.StdArgumentTypes +import HOC.ID +import HOC.NewlyAllocated(NewlyAllocated) -import Language.Haskell.THSyntax import Data.Char(isUpper, toLower, toUpper) import Data.Maybe(fromMaybe) import Control.Monad(MonadPlus(mplus)) +import HOC.TH + data Covariant data CovariantInstance data Allocated @@ -36,17 +39,96 @@ nArgs = countArgs typeSig (isPure, pureType) = case resultType typeSig of - ConT "GHC.IOBase:IO" `AppT` ty -> (False, ty) + (ConT con) `AppT` ty + | con == ''IO -> (False, ty) ty -> error $ haskellName ++ " --- selector type must be in the IO monad" -- ty -> (True, ty) - isUnit = case pureType of - ConT "GHC.Base:()" -> True - _ -> False - + isUnit = pureType == ConT ''() (resultRetained, doctoredTypeSig) = doctorType typeSig className + resultType (ForallT vars ctxt ty) = resultType ty + resultType ((ArrowT `AppT` _) `AppT` rest) = resultType rest + resultType other = other + + countArgs (ForallT vars ctxt ty) = countArgs ty + countArgs ((ArrowT `AppT` _) `AppT` rest) = 1 + countArgs rest + countArgs other = 0 + + replaceResult new (ForallT vars ctxt ty) = ForallT vars ctxt (replaceResult new ty) + replaceResult new ((ArrowT `AppT` arg) `AppT` rest) = + (ArrowT `AppT` arg) `AppT` replaceResult new rest + replaceResult new result = new + + doctorType ty className = + ( + retained, + (if needInstance + then ForallT (map mkName ["target", "inst"]) + [ConT (mkName className) `AppT` VarT (mkName "target"), + ConT (mkName "ClassAndObject") + `AppT` VarT (mkName "target") `AppT` VarT (mkName "inst")] + else ForallT [mkName "target"] + [ConT (mkName className) `AppT` VarT (mkName "target")]) $ + replaceResult ( + (ArrowT `AppT` (fromMaybe (VarT $ mkName "target") targetType)) + `AppT` covariantResult + ) ty + ) + where + (retained, needInstance, targetType, covariantResult) = + doctorCovariant $ resultType ty + + doctorCovariant (ConT con) + | con == ''Covariant = + (False, False, Nothing, VarT $ mkName "target") + | con == ''CovariantInstance = + (False, True, Nothing, VarT $ mkName "inst") + | con == ''Allocated = + (False, True, Nothing, + ConT ''NewlyAllocated `AppT` VarT (mkName "inst")) + | con == ''Inited = + (True, False, + Just (ConT ''NewlyAllocated `AppT` VarT (mkName "target")), + VarT (mkName "target")) + + doctorCovariant (ConT con `AppT` ty) | con == ''Retained = + (True,inst', target', ty') + where (_,inst', target', ty') = doctorCovariant ty + + doctorCovariant (t1 `AppT` t2) = + (retained1 || retained2, needInst1 || needInst2, target1 `mplus` target2, t1' `AppT` t2') + where (retained1, needInst1, target1, t1') = doctorCovariant t1 + (retained2, needInst2, target2, t2') = doctorCovariant t2 + + doctorCovariant other = (False, False, Nothing, other) + + -- Reduce the type to a form that can be used for creating a libffi CIF + -- using the ObjCIMPType type class: + + simplifyType (ForallT vars ctxt ty) = simplifyType ty + simplifyType ((ArrowT `AppT` arg) `AppT` rest) = (ArrowT `AppT` replaceVarByUnit arg) + `AppT` simplifyType rest + simplifyType (ConT con `AppT` x) | con == ''IO = ConT ''IO `AppT` replaceVarByUnit x + simplifyType x = replaceVarByUnit x + + replaceVarByUnit (VarT var) = ConT ''ID `AppT` ConT ''() + replaceVarByUnit (ConT con `AppT` ty) + | con == ''NewlyAllocated = replaceVarByUnit ty + replaceVarByUnit (ConT cls `AppT` VarT var) = ConT cls `AppT` ConT ''() + replaceVarByUnit x = x + + + makeImpType ty = replaceResult ( + (ArrowT `AppT` VarT (mkName "target")) + `AppT` covariantResult + ) ty' + where + ty' = simplifyType ty + (_retained, _needInstance, _target', covariantResult) = + doctorCovariant $ resultType ty' + sequence $ [ -- $(selectorName) = getSelectorForName "name" @@ -55,7 +137,7 @@ -- $(infoName) = ... let e = [| undefined |] `sigE` (return $ simplifyType doctoredTypeSig) - in valD (VarP infoName) (normalB + in valD (varP $ mkName $ infoName) (normalB [| SelectorInfo name haskellName @@ -66,105 +148,26 @@ |]) [], -- type $(imptypeName) target inst = arg1 -> arg2 -> target -> IO result - tySynD imptypeName ["target","inst"] (return $ makeImpType typeSig), + tySynD (mkName imptypeName) (map mkName ["target","inst"]) + (return $ makeImpType typeSig), -- class Object a => $(className) a - classD (cxt [conT "Object" `appT` varT "a"]) className ["a"] [], + classD (cxt [conT (mkName "Object") `appT` varT (mkName "a")]) + (mkName className) [mkName "a"] [] [], - sigD haskellName $ return doctoredTypeSig, + sigD (mkName haskellName) $ return doctoredTypeSig, if nArgs > marshallersUpTo || resultRetained - then makeMarshaller (Just infoName) haskellName nArgs + then makeMarshaller (Just $ mkName infoName) (mkName haskellName) nArgs isUnit isPure resultRetained - else valD (VarP haskellName) (normalB [| - $(varE $ thModulePrefix "DeclareSelector" $ - marshallerName nArgs isUnit) - $(varE infoName) + else valD (varP $ mkName haskellName) (normalB [| + $(varE $ + mkNameG_v "HOC.DeclareSelector" $ + marshallerName nArgs isUnit + ) + $(varE $ mkName infoName) |]) [] ] - declareSelector name typeSig = declareRenamedSelector name (mangleSelectorName name) typeSig -resultType (ForallT vars ctxt ty) = resultType ty -resultType ((ArrowT `AppT` _) `AppT` rest) = resultType rest -resultType other = other - -countArgs (ForallT vars ctxt ty) = countArgs ty -countArgs ((ArrowT `AppT` _) `AppT` rest) = 1 + countArgs rest -countArgs other = 0 - -replaceResult new (ForallT vars ctxt ty) = ForallT vars ctxt (replaceResult new ty) -replaceResult new ((ArrowT `AppT` arg) `AppT` rest) = - (ArrowT `AppT` arg) `AppT` replaceResult new rest -replaceResult new result = new - -doctorType ty className = - ( - retained, - (if needInstance - then ForallT ["target", "inst"] [ConT className `AppT` VarT "target", - ConT "ClassAndObject" - `AppT` VarT "target" `AppT` VarT "inst"] - else ForallT ["target"] [ConT className `AppT` VarT "target"]) $ - replaceResult ( - (ArrowT `AppT` (fromMaybe (VarT "target") targetType)) - `AppT` covariantResult - ) ty - ) - where - (retained, needInstance, targetType, covariantResult) = doctorCovariant $ resultType ty - -doctorCovariant (ConT "HOC.DeclareSelector:Covariant") = (False, False, Nothing, VarT "target") - -doctorCovariant (ConT "HOC.DeclareSelector:CovariantInstance") = (False, True, Nothing, VarT "inst") - -doctorCovariant (ConT "HOC.DeclareSelector:Allocated") = - (False, True, Nothing, ConT "HOC.NewlyAllocated:NewlyAllocated" `AppT` VarT "inst") - -doctorCovariant (ConT "HOC.DeclareSelector:Inited") = - (True, False, Just (ConT "HOC.NewlyAllocated:NewlyAllocated" `AppT` VarT "target"), VarT "target") - -doctorCovariant (ConT "HOC.DeclareSelector:Retained" `AppT` ty) = - (True,inst', target', ty') - where (_,inst', target', ty') = doctorCovariant ty - -doctorCovariant (t1 `AppT` t2) = - (retained1 || retained2, needInst1 || needInst2, target1 `mplus` target2, t1' `AppT` t2') - where (retained1, needInst1, target1, t1') = doctorCovariant t1 - (retained2, needInst2, target2, t2') = doctorCovariant t2 - -doctorCovariant other = (False, False, Nothing, other) - --- Reduce the type to a form that can be used for creating a libffi CIF --- using the ObjCIMPType type class: - -simplifyType (ForallT vars ctxt ty) = simplifyType ty -simplifyType ((ArrowT `AppT` arg) `AppT` rest) = (ArrowT `AppT` replaceVarByUnit arg) - `AppT` simplifyType rest -simplifyType (ConT "GHC.IOBase:IO" `AppT` x) = ConT "GHC.IOBase:IO" `AppT` replaceVarByUnit x -simplifyType x = replaceVarByUnit x - -replaceVarByUnit (VarT var) = ConT "HOC.ID:ID" `AppT` ConT "GHC.Base:()" -replaceVarByUnit (ConT "HOC.NewlyAllocated:NewlyAllocated" `AppT` ty) = - replaceVarByUnit ty -replaceVarByUnit (ConT cls `AppT` VarT var) = ConT cls `AppT` ConT "GHC.Base:()" -replaceVarByUnit x = x - --- === - -{- -makeImpType (ForallT vars ctxt ty) = makeImpType ty -makeImpType ((ArrowT `AppT` arg) `AppT` (ConT "GHC.IOBase:IO" `AppT` ret)) = - (ArrowT `AppT` VarT "target") `AppT` (ConT "GHC.IOBase:IO" `AppT` replaceVarByUnit ret) -makeImpType ((ArrowT `AppT` arg) `AppT` rest) = (ArrowT `AppT` replaceVarByUnit arg) - `AppT` makeImpType rest --} - -makeImpType ty = replaceResult ( - (ArrowT `AppT` VarT "target") - `AppT` covariantResult - ) ty' - where - ty' = simplifyType ty - (_retained, _needInstance, _target', covariantResult) = doctorCovariant $ resultType ty' Index: DeclareClass.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC/DeclareClass.hs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- DeclareClass.hs 27 Oct 2003 16:48:04 -0000 1.1.1.1 +++ DeclareClass.hs 6 Dec 2004 03:46:51 -0000 1.2 @@ -1,32 +1,40 @@ -module HOC.DeclareClass where +module HOC.DeclareClass(declareClass) where import HOC.Base import HOC.Arguments import HOC.Class -import Language.Haskell.THSyntax +import HOC.TH + import Foreign.Ptr declareClass :: String -> String -> Q [Dec] declareClass name super = sequence $ [ -- data $(phantomName) a - dataD (cxt []) phantomName ["a"] [] [], + dataD (cxt []) (mkName phantomName) [mkName "a"] [] [], -- type $(name) a = $(super) ($(phantomName) a) - tySynD name ["a"] (conT super `appT` (conT phantomName `appT` varT "a")), + tySynD (mkName name) [mkName "a"] + (conT (mkName super) `appT` (conT (mkName phantomName) + `appT` varT (mkName "a"))), -- type $(metaClassName) a = $(superMetaClassName) ($(phantomName) a) - tySynD metaClassName ["a"] (conT superMetaClassName `appT` (conT phantomName `appT` varT "a")), + tySynD (mkName metaClassName) [mkName "a"] + (conT (mkName superMetaClassName) + `appT` (conT (mkName phantomName) + `appT` varT (mkName "a"))), -- $(classObjectName) :: $(metaClassName) () - sigD classObjectName (conT metaClassName `appT` [t| () |]), + sigD (mkName classObjectName) (conT (mkName metaClassName) + `appT` [t| () |]), -- $(classObjectName) = unsafeGetClassObject "name" - valD (VarP classObjectName) (normalB [| unsafeGetClassObject $(stringE name) |]) [], - + valD (return $ VarP (mkName classObjectName)) + (normalB [| unsafeGetClassObject $(stringE name) |]) [], + -- $(superName) = "super" - valD (VarP superName) (normalB [| super |]) [] + valD (return $ VarP (mkName superName)) (normalB [| super |]) [] ] where phantomName = name ++ "_" Index: Arguments.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC/Arguments.hs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Arguments.hs 27 Oct 2003 16:48:03 -0000 1.1.1.1 +++ Arguments.hs 6 Dec 2004 03:46:51 -0000 1.2 @@ -8,7 +8,7 @@ import Foreign.Ptr import System.IO.Unsafe(unsafePerformIO) -import Language.Haskell.THSyntax +import HOC.TH class (Storable b, FFITypeable b) => ObjCArgument a b | a -> b where withExportedArgument :: a -> (b -> IO c) -> IO c @@ -28,9 +28,19 @@ -} declareStorableObjCArgument :: TypeQ -> String -> Q [Dec] + +{- This is what we'd like to do. +declareStorableObjCArgument ty str = + [d| instance ObjCArgument $(ty) $(ty) where + exportArgument = return + importArgument = return + objCTypeString = str + |] +-} + declareStorableObjCArgument ty str = do - argInst <- instanceD (cxt []) (conT (thModulePrefix "Arguments" "ObjCArgument") - `appT` ty `appT` ty) + argInst <- instanceD (cxt []) (conT ''ObjCArgument + `appT` ty `appT` ty) `whereQ` [d| {- withExportedArgument = flip ($) -} exportArgument = return --- NEW FILE: TH.hs --- module HOC.TH( module Language.Haskell.TH, mkNameG_v, mkNameG_tc, mkNameG_d, ) where import Language.Haskell.TH import Language.Haskell.TH.Syntax instance Functor Q where fmap f q = q >>= return . f Index: ExportClass.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC/ExportClass.hs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ExportClass.hs 8 May 2004 16:34:56 -0000 1.5 +++ ExportClass.hs 6 Dec 2004 03:46:51 -0000 1.6 @@ -1,6 +1,5 @@ module HOC.ExportClass where -import Language.Haskell.THSyntax import Foreign import Foreign.C.String import Control.Concurrent.MVar @@ -16,6 +15,7 @@ import HOC.SelectorMarshaller import HOC.Class import HOC.NewClass +import HOC.TH data ClassMember = InstanceMethod SelectorInfo @@ -64,12 +64,12 @@ -> Q [Dec] -- ^ A Haskell declaration, which can be spliced in -- with Template Haskell's $(...) syntax exportClass name prefix members = sequence $ [ - valD (VarP exportFunName) (normalB (mkClassExportAction name prefix members)) [], - dataD (cxt []) instanceDataName [] [normalC instanceDataName strictTypes] [], - valD (VarP tyConVar) (normalB [| mkTyCon instanceDataName |]) [], - instanceD (cxt []) (conT "Data.Typeable:Typeable" `appT` instTy) `whereQ` - [d| typeOf _ = mkAppTy $(varE tyConVar) [] |], - instanceD (cxt []) (conT (thModulePrefix "ExportClass" "InstanceVariables") + valD (varP $ mkName exportFunName) + (normalB (mkClassExportAction name prefix members)) [], + dataD (cxt []) (mkName instanceDataName) [] + [normalC (mkName instanceDataName) strictTypes] [''Typeable], + valD (varP $ mkName tyConVar) (normalB [| mkTyCon instanceDataName |]) [], + instanceD (cxt []) (conT ''InstanceVariables `appT` clsTy `appT` instTy) `whereQ` [d| initializeInstanceVariables = $(initIVars) @@ -82,22 +82,24 @@ strictTypes = map (strictType (return IsStrict)) wrappedIvarTypes ivars = [ (name, ty, [| nil |]) | Outlet name ty <- members ] ++ [ (name, ty, initial) | InstanceVariable name ty initial <- members ] - wrappedIvarTypes = [ conT "GHC.IOBase:MVar" `appT` ty | (_,ty,_) <- ivars ] + wrappedIvarTypes = [ conT ''MVar `appT` ty | (_,ty,_) <- ivars ] ivarNames = [ name | (name,_,_) <- ivars ] - clsTy = conT name `appT` conT "GHC.Base:()" - instTy = conT instanceDataName + clsTy = conT (mkName name) `appT` [t| () |] + instTy = conT (mkName instanceDataName) nIVars = length ivarNames declaredIVars = zipWith declareIVar ivarNames [1..] - declareIVar ivar n = valD (VarP ('_' : ivar)) (normalB [| IVar $(getNth n) |]) [] + declareIVar ivar n = valD (varP $ mkName ('_' : ivar)) + (normalB [| IVar $(getNth n) |]) [] where - getNth n = lamE [conP instanceDataName args] (varE $ "arg" ++ show n) - args = [ varP $ "arg" ++ show i | i <- [1..nIVars] ] + getNth n = lamE [conP (mkName instanceDataName) args] + (varE $ mkName $ "arg" ++ show n) + args = [ varP $ mkName $ "arg" ++ show i | i <- [1..nIVars] ] initIVars = doE (map initIVar ivars ++ [noBindS [| return $(wrap) |]]) where - wrap = foldl appE (conE instanceDataName) (map varE ivarNames) - initIVar (ivar,ty,initial) = bindS (varP ivar) [| newMVar $(initial) |] + wrap = foldl appE (conE $ mkName instanceDataName) (map (varE.mkName) ivarNames) + initIVar (ivar,ty,initial) = bindS (varP $ mkName ivar) [| newMVar $(initial) |] data Method = ImplementedMethod SelectorInfo String | GetterMethod String @@ -106,7 +108,7 @@ mkClassExportAction name prefix members = [| do - super <- getClassByName $(varE $ "super_" ++ name) + super <- getClassByName $(varE $ mkName $ "super_" ++ name) ivars <- makeDefaultIvarList imethods <- makeMethodList (nIMethods+3) cmethods <- makeMethodList nCMethods @@ -121,7 +123,8 @@ newClass super clsname defaultIvarSize ivars imethods cmethods |] where - typedInitIvars = [|initializeInstanceVariables|] `sigE` (conT "GHC.IOBase:IO" `appT` conT (name ++ "_IVARS")) + typedInitIvars = [|initializeInstanceVariables|] + `sigE` (conT ''IO `appT` conT (mkName $ name ++ "_IVARS")) outlets = [ name | Outlet name _ <- members ] classMethods = [ ImplementedMethod info (prefix ++ selectorInfoHaskellName info) @@ -152,28 +155,28 @@ exportMethod' isClassMethod objCMethodList num methodBody nArgs isUnit impTypeName selExpr cifExpr where - methodBody = varE methodDefinition + methodBody = varE $ mkName methodDefinition selName = selectorInfoHaskellName selectorInfo nArgs = selectorInfoNArgs selectorInfo isUnit = selectorInfoIsUnit selectorInfo - impTypeName = "ImpType_" ++ selName - selExpr = [| selectorInfoSel $(varE $ "info_" ++ selName) |] - cifExpr = [| selectorInfoCif $(varE $ "info_" ++ selName) |] + impTypeName = mkName $ "ImpType_" ++ selName + selExpr = [| selectorInfoSel $(varE $ mkName $ "info_" ++ selName) |] + cifExpr = [| selectorInfoCif $(varE $ mkName $ "info_" ++ selName) |] exportMethod isClassMethod objCMethodList (GetterMethod ivarName, num) = exportMethod' isClassMethod objCMethodList num - (varE (thModulePrefix "ExportClass" "getAsID") `appE` varE ('_':ivarName)) - 0 False (thModulePrefix "ExportClass" "GetVarImpType") + ([| getAsID |] `appE` varE (mkName ('_':ivarName))) + 0 False (''GetVarImpType) [| getSelectorForName ivarName |] - (varE (thModulePrefix "ExportClass" "getVarCif")) + [| getVarCif |] exportMethod isClassMethod objCMethodList (SetterMethod ivarName, num) = exportMethod' isClassMethod objCMethodList num - (varE (thModulePrefix "ExportClass" "setAsID") `appE` varE ('_':ivarName)) - 1 True (thModulePrefix "ExportClass" "SetVarImpType") + ([| setAsID |] `appE` varE (mkName ('_':ivarName))) + 1 True (''SetVarImpType) [| getSelectorForName setterName |] - (varE (thModulePrefix "ExportClass" "setVarCif")) + [| setVarCif |] where setterName = setterNameFor ivarName @@ -188,7 +191,7 @@ $(selExpr) (objCMethodType $(typed [|undefined|])) $(cifExpr) - ($(lamE [varP "cif", varP "ret", varP "args"] marshal)) + ($(lamE (map (varP.mkName) ["cif","ret","args"]) marshal)) |] where marshal = [| exceptionHaskellToObjC $(marshal') |] @@ -204,29 +207,30 @@ [noBindS typedBodyWithArgs] | otherwise = [ - bindS (VarP "result") typedBodyWithArgs, + bindS (varP $ mkName "result") typedBodyWithArgs, noBindS [| setMarshalledRetval - $(varE "ret") $(varE "result") |] + $(varE $ mkName "ret") + $(varE $ mkName "result") |] ] typedBodyWithArgs = foldl1 appE (typed methodBody - : map varE (arguments ++ ["self"])) + : map (varE.mkName)(arguments ++ ["self"])) where arguments = ["arg" ++ show i | i <- [1..nArgs]] typed thing = thing `sigE` (conT impTypeName `appT` (targetType - `appT` conT "GHC.Base:()") + `appT` [t| () |]) `appT` (instanceType - `appT` conT "GHC.Base:()") + `appT` [t| () |]) ) - targetType | isClassMethod = conT $ name ++ "Class" + targetType | isClassMethod = conT $ mkName $ name ++ "Class" | otherwise = instanceType - instanceType = conT name + instanceType = conT $ mkName name getArg (argname, argnum) = - bindS (VarP argname) - [| getMarshalledArgument $(varE "args") argnum |] + bindS (varP (mkName argname)) + [| getMarshalledArgument $(varE $ mkName "args") argnum |] Index: Base.hs =================================================================== RCS file: /cvsroot/hoc/hoc/HOC/HOC/Base.hs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Base.hs 27 Oct 2003 16:48:04 -0000 1.1.1.1 +++ Base.hs 6 Dec 2004 03:46:51 -0000 1.2 @@ -58,5 +58,3 @@ -- - -thModulePrefix mod id = "HOC." ++ mod ++ ":" ++ id |
From: Wolfgang T. <wth...@us...> - 2004-12-06 03:47:07
|
Update of /cvsroot/hoc/hoc/Tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28748/Tools Modified Files: Makefile.in Log Message: Upgrade to GHC 6.3, recent snapshot. I'm sure there are more places in HOC.* where we can take advantage of TH 2.0's new features, and the Cabal-aware build system is still quite fragile. Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/Tools/Makefile.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.in 19 May 2004 16:06:05 -0000 1.4 +++ Makefile.in 6 Dec 2004 03:46:49 -0000 1.5 @@ -14,8 +14,7 @@ -fglasgow-exts \ -o hocwrap \ -odir build/hocwrap -hidir build/hocwrap \ - -package-conf ../HOC/HOC-$(PLATFORM).conf-inplace \ - -package-conf ../Foundation/Foundation.conf-inplace + -package-conf ../inplace.conf clean: rm -rf hocwrap build |
From: Wolfgang T. <wth...@us...> - 2004-12-06 03:47:01
|
Update of /cvsroot/hoc/hoc/AppKit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28748/AppKit Modified Files: Makefile.in Log Message: Upgrade to GHC 6.3, recent snapshot. I'm sure there are more places in HOC.* where we can take advantage of TH 2.0's new features, and the Cabal-aware build system is still quite fragile. Index: Makefile.in =================================================================== RCS file: /cvsroot/hoc/hoc/AppKit/Makefile.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.in 17 May 2004 18:07:41 -0000 1.5 +++ Makefile.in 6 Dec 2004 03:46:49 -0000 1.6 @@ -7,7 +7,23 @@ Makefile.in \ $(NULL) -all: libHSAppKit.a HSAppKit.o +all: libHSAppKit.a HSAppKit.o ../inplace.conf + +../inplace.conf: AppKit.conf-inplace + $(GHC_PKG) unregister --force --package-conf=../inplace.conf AppKit || true + $(GHC_PKG) register AppKit.conf-inplace \ + --package-conf=../inplace.conf + +exposed-modules.txt: + find build/imports | grep '\.hi' \ + | sed 's@build/imports/@ ,@g' | sed 's/\.hi//g' | sed 's@/@.@g' \ + > exposed-modules.txt + +AppKit.conf-inplace: AppKit-$(PLATFORM).conf-inplace.in exposed-modules.txt + cat AppKit-$(PLATFORM).conf-inplace.in exposed-modules.txt > AppKit.conf-inplace + +AppKit.conf: AppKit-$(PLATFORM).conf.in exposed-modules.txt + cat AppKit-$(PLATFORM).conf.in exposed-modules.txt > AppKit.conf ghcmake: ghcmake.build-stamp @@ -22,50 +38,47 @@ mkdir -p build/objects mkdir -p build/imports $(GHC) --make AppKit.hs \ - -package-name AppKit \ + -ignore-package AppKit \ -odir build/objects \ -hidir build/imports \ - -package-conf ../HOC/HOC-$(PLATFORM).conf-inplace \ - -package-conf ../Foundation/Foundation.conf-inplace \ + -package-conf ../inplace.conf \ -fglasgow-exts test ! -r GNUstepGUI.hs || \ $(GHC) --make GNUstepGUI.hs \ - -package-name AppKit \ + -ignore-package AppKit \ -odir build/objects \ -hidir build/imports \ - -package-conf ../HOC/HOC-$(PLATFORM).conf-inplace \ - -package-conf ../Foundation/Foundation.conf-inplace \ + -package-conf ../inplace.conf \ -fglasgow-exts $(GHC) -c Cocoa.hs \ - -package-name AppKit \ + -ignore-package AppKit \ -ibuild/imports \ -o build/objects/Cocoa.o \ -ohi build/imports/Cocoa.hi \ - -package-conf ../HOC/HOC-$(PLATFORM).conf-inplace \ - -package-conf ../Foundation/Foundation.conf-inplace \ + -package-conf ../inplace.conf \ -fglasgow-exts touch $@ HSAppKit.o: ghcmake.build-stamp 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 +libHSAppKit.a: ghcmake + find build/objects/ -name \*.o | xargs libtool -static -o libHSAppKit.a -libHSAppKit.a: HSAppKit.o - rm -f libHSAppKit.a - ar cq libHSAppKit.a HSAppKit.o - ranlib libHSAppKit.a +#libHSAppKit.a: HSAppKit.o +# rm -f libHSAppKit.a +# ar cq libHSAppKit.a HSAppKit.o +# ranlib libHSAppKit.a clean: rm -rf build libHSAppKit.a HSAppKit.o AppKit.hs AppKit \ Cocoa.hs ghcmake.build-stamp -install: all +install: all AppKit.conf mkdir -p $(GHC_LIB_PATH)/AppKit cp -R libHSAppKit.a HSAppKit.o build/imports \ $(GHC_LIB_PATH)/AppKit/ ranlib $(GHC_LIB_PATH)/AppKit/libHSAppKit.a ghc-pkg --update-package \ - --input-file=AppKit-$(PLATFORM).conf + --input-file=AppKit.conf |
From: Wolfgang T. <wth...@us...> - 2004-12-06 03:47:00
|
Update of /cvsroot/hoc/hoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28748 Modified Files: configure.ac Log Message: Upgrade to GHC 6.3, recent snapshot. I'm sure there are more places in HOC.* where we can take advantage of TH 2.0's new features, and the Cabal-aware build system is still quite fragile. Index: configure.ac =================================================================== RCS file: /cvsroot/hoc/hoc/configure.ac,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- configure.ac 17 May 2004 18:40:20 -0000 1.7 +++ configure.ac 6 Dec 2004 03:46:49 -0000 1.8 @@ -60,13 +60,13 @@ ghc_minor=`echo "$ghc_version" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p'` changequote([, ]) AC_MSG_RESULT([$ghc_version]) - if test '(' "$ghc_major" -ge 6 -a "$ghc_minor" -ge 2 ')' -o \ - '(' "$ghc_major" -ge 6 ')'; then + if test '(' "$ghc_major" -ge 6 -a "$ghc_minor" -ge 3 ')' -o \ + '(' "$ghc_major" -gt 6 ')'; then AC_MSG_CHECKING([for ghc library directory]) GHC_LIB_PATH=`$GHC --print-libdir` AC_MSG_RESULT([$GHC_LIB_PATH]) else - AC_MSG_ERROR([** Sorry, your GHC is too old. GHC >= 6.2 required.]) + AC_MSG_ERROR([** Sorry, your GHC is too old. GHC >= 6.3 (Dec. 04 snapshot) required.]) GHC="" fi else |
From: Andre P. <at...@us...> - 2004-06-01 07:56:21
|
Update of /cvsroot/hoc/hoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17086 Added Files: TODO Log Message: Added TODO file --- NEW FILE: TODO --- Mac OS X installer package Xcode integration Hmmm... but it doesn't even rebuild them now when it needs to - can we make the build-stamp depend on something like *.hs? |
From: Andre P. <at...@us...> - 2004-05-25 01:59:28
|
Update of /cvsroot/hoc/hoc/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12453 Modified Files: Quick_Start.pod Log Message: Changed URL reference from localhost to hoc.sourceforge.net Index: Quick_Start.pod =================================================================== RCS file: /cvsroot/hoc/hoc/docs/Quick_Start.pod,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Quick_Start.pod 19 May 2004 16:18:28 -0000 1.10 +++ Quick_Start.pod 25 May 2004 01:59:18 -0000 1.11 @@ -123,7 +123,7 @@ Now, you want to wrap a GUI around this module so that people can use it without loading GHC or the Apple Terminal application: see -L<http://localhost/~andrep/hoc/screenshots/ExpressionParser_view.png> +L<http://hoc.sourceforge.net/screenshots/ExpressionParser_view.png> for a screenshot of what the GUI will look like. From a programing perspective, the GUI consists of: |
From: Andre P. <at...@us...> - 2004-05-23 16:06:10
|
Update of /cvsroot/hoc/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16466 Modified Files: index.html Log Message: 19 May was a Wednesday, not a Friday. :) Index: index.html =================================================================== RCS file: /cvsroot/hoc/www/index.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- index.html 19 May 2004 17:33:33 -0000 1.11 +++ index.html 23 May 2004 16:05:53 -0000 1.12 @@ -41,7 +41,7 @@ <h1>News</h1> -<p>Friday, 19 May 2004: <strong>HOC 0.7 released</strong>. HOC 0.7 is +<p>Wednesday, 19 May 2004: <strong>HOC 0.7 released</strong>. HOC 0.7 is a complete rewrite of the early HOC development snapshot. See the <a href="http://sourceforge.net/project/shownotes.php?release_id=239505">release notes</a>, or <a |
From: Andre P. <at...@us...> - 2004-05-20 02:17:14
|
Update of /cvsroot/hoc/hoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25756 Modified Files: BUILDING.CVS Log Message: Added blurb on cvsps Index: BUILDING.CVS =================================================================== RCS file: /cvsroot/hoc/hoc/BUILDING.CVS,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- BUILDING.CVS 12 May 2004 05:43:58 -0000 1.1 +++ BUILDING.CVS 20 May 2004 02:17:05 -0000 1.2 @@ -18,3 +18,17 @@ 3. Build HOC as usual with ./configure && make && make install. + +cvsps +===== + +While we'd love to use a more modern revision control system such as +darcs, Subversion or GNU arch, Sourceforge "only" provides a CVS server, +so we're using that. For people who are used to more modern revision +control systems and miss working with 'patchsets' instead of the disjoint +per-file patches that CVS uses, take a look at cvsps +<http://www.cobite.com/cvsps/>, a patchset manager for CVS. While it +doesn't, by any means, give you the many advantages that more modern +source control systems offer you, it certainly makes using CVS and +managing patches far easier! + |
From: Andre P. <at...@us...> - 2004-05-19 17:39:17
|
Update of /cvsroot/hoc/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23935 Modified Files: hoc-documentation.css Log Message: Updated documentation CSS Index: hoc-documentation.css =================================================================== RCS file: /cvsroot/hoc/www/hoc-documentation.css,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- hoc-documentation.css 19 May 2004 07:44:48 -0000 1.1 +++ hoc-documentation.css 19 May 2004 17:39:07 -0000 1.2 @@ -1,6 +1,6 @@ /* :: general text formatting :: */ -a { +a:link { color: 0000CC; text-decoration: none; border: none; @@ -18,8 +18,7 @@ p { font-size:100%; - margin: 12px 0; - text-align: justify; + margin: 6px 0; } p.center { @@ -57,33 +56,31 @@ font-size:150%; line-height: 150%; color: #000066; - text-align: center; } h2 { font-family: Verdana, sans-serif; font-size:120%; line-height: 120%; - /* color: #000066; */ - text-align: center; + color: #000000; } h3 { font-family: Verdana, sans-serif; font-size:120%; - color: #333333; + color: #000000; } h4 { font-family: Verdana, sans-serif; font-size:110%; - color: #333333; + color: #000000; } h5 { font-family: Verdana, sans-serif; font-size:110%; - color: #3A3A3A; + color: #000000; } img { |
From: Andre P. <at...@us...> - 2004-05-19 17:33:43
|
Update of /cvsroot/hoc/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22752 Modified Files: index.html Log Message: Spruced up HOC blurb on the home page Index: index.html =================================================================== RCS file: /cvsroot/hoc/www/index.html,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- index.html 19 May 2004 17:18:39 -0000 1.10 +++ index.html 19 May 2004 17:33:33 -0000 1.11 @@ -29,8 +29,15 @@ </ul> -<p>You can use HOC to write <a href="screenshots.html">full-blown GUI -applications</a> using Mac OS X's advanced Cocoa framework.</p> +<p>You can write <a href="screenshots.html">full-blown applications</a> in HOC +and use all of the Foundation, AppKit and Cocoa frameworks' classes (including +all of the AppKit's GUI objects), combining Objective-C tools such as Mac OS +X's advanced <a + href="http://developer.apple.com/tools/interfacebuilder/">Interface + Builder</a> to build the GUI graphically while writing controllers for the +GUI in Haskell. You can even mix and match custom objects written in +Objective-C with objects written in Haskell, depending on which language you +find more suitable for the task. <h1>News</h1> |
From: Andre P. <at...@us...> - 2004-05-19 17:28:23
|
Update of /cvsroot/hoc/www/screenshots In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21846 Added Files: index.html Log Message: Added screenshots/index.html (for all those HC&A visitors) --- NEW FILE: index.html --- <html> <head> <meta http-equiv="refresh" content="2;url=http://hoc.sourceforge.net/screenshots.html"> </head> <body> <p>See <a href="http://hoc.sourceforge.net/screenshots.html">http://hoc.sourceforge.net/screenshots.html</a>.</p> </body> </html> |
From: Andre P. <at...@us...> - 2004-05-19 17:18:56
|
Update of /cvsroot/hoc/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19176 Modified Files: download.html index.html Log Message: Added URLs for HOC 0.7 release Index: download.html =================================================================== RCS file: /cvsroot/hoc/www/download.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- download.html 19 May 2004 07:20:23 -0000 1.3 +++ download.html 19 May 2004 17:18:39 -0000 1.4 @@ -43,7 +43,13 @@ </tr> <tr valign="top"> - <td nowrap>0.7 (release notes)</td> + + <td nowrap><a + href="http://prdownloads.sourceforge.net/hoc/hoc-0.7.tar.bz2?download">0.7</a> + (<a + href="http://sourceforge.net/project/shownotes.php?release_id=239505">release + notes</a>)</td> + <td></td> <td>Major changes: <em>typed interface</em>, memory management, update to @@ -52,8 +58,12 @@ </tr> <tr valign="top"> - <td nowrap><a href="http://prdownloads.sourceforge.net/hoc/HOC020103.tar.bz2?download">0.1</a> (<a href="http://sourceforge.net/project/shownotes.php?release_id=238704">release notes</a>)</td> - <td></td> + + <td nowrap><a + href="http://prdownloads.sourceforge.net/hoc/HOC020103.tar.bz2?download">0.1</a> + (<a + href="http://sourceforge.net/project/shownotes.php?release_id=238704">release + notes</a>)</td> <td></td> <td>First development snapshot; more an experiment into Template Haskell than anything else (for historical interest only).</td> Index: index.html =================================================================== RCS file: /cvsroot/hoc/www/index.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- index.html 19 May 2004 16:16:40 -0000 1.9 +++ index.html 19 May 2004 17:18:39 -0000 1.10 @@ -29,21 +29,24 @@ </ul> -<p>You can use HOC to write full-blown GUI applications using Mac OS X's -advanced Cocoa framework.</p> +<p>You can use HOC to write <a href="screenshots.html">full-blown GUI +applications</a> using Mac OS X's advanced Cocoa framework.</p> <h1>News</h1> -<p>Friday, 19 May 2004: <strong>HOC 0.7 released</strong>.</p> - -<p>Thursday, 2 Jan 2003: <strong>HOC 0.1 released</strong>. See the <a - href="http://www.haskell.org/pipermail/glasgow-haskell-users/2003-January/004602.html">full - release announcement</a>, or <a - href="http://prdownloads.sourceforge.net/hoc/HOC020103.tar.bz2?download">download +<p>Friday, 19 May 2004: <strong>HOC 0.7 released</strong>. HOC 0.7 is +a complete rewrite of the early HOC development snapshot. See the <a + href="http://sourceforge.net/project/shownotes.php?release_id=239505">release + notes</a>, or <a + href="http://prdownloads.sourceforge.net/hoc/hoc-0.7.tar.bz2?download">download it</a> here.</p> - -</p> +<p>Thursday, 2 Jan 2003: <strong>HOC development snapshot released</strong>. + See the <a + href="http://www.haskell.org/pipermail/glasgow-haskell-users/2003-January/004602.html">full + release announcement</a>, or <a + href="http://prdownloads.sourceforge.net/hoc/HOC020103.tar.bz2?download">download + it</a> here.</p> <h1>License</h1> |
From: Andre P. <at...@us...> - 2004-05-19 16:51:46
|
Update of /cvsroot/hoc/hoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13798 Modified Files: LICENSE Log Message: Updated LICENSE file to include copyright by me. (Hope you don't mind, Wolfgang :) Index: LICENSE =================================================================== RCS file: /cvsroot/hoc/hoc/LICENSE,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- LICENSE 25 Feb 2004 11:37:02 -0000 1.2 +++ LICENSE 19 May 2004 16:51:36 -0000 1.3 @@ -1,4 +1,7 @@ -HOC - Copyright (c) 2003 Wolfgang Thaller +HOC: A Haskell to Objective-C Binding + +Copyright (C) 2003-2004 Wolfgang Thaller +Copyright (C) 2004 Andre Pang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the |