OS X - Haskell to Objective-C Binding on GHC 6.6

Charlie Conklin charlie_conklin at yahoo.co.uk
Thu Oct 26 13:15:27 EDT 2006

Is anyone out there running OS X and using HOC and GHC 6.6? I took the latest
from cvs and got some way toward getting it to compile by changing the code to:

1. reflect changes regarding packages, i.e. adding -package-name to the
pertinent makefiles, and accommodating the changed signature of
Language.Haskell.TH.Syntax mkNameG_v and mkNameG_tc

2. replacing the obsolete names used from Data.Set which have been removed from
GHC 6.6.

At that point HOC was able to get to the point where it parses the ObjC headers,
but it then choked on compiling the generated .hs files, some of which seem to
have invalid constructions like:

-- enum definitions
$(declareAnonymousCEnum [("NSFileNoSuchFileError", 4),("NSFileLockingError",
255),("NSFileReadUnknownError", 256),("NSFileReadNoPermissionError",
257),("NSFileReadInvalidFileNameError", 25,("NSFileReadCorruptFileError",
261),("NSFileReadUnsupportedSchemeError", 262),("NSFileWriteUnknownError",
512),("NSFileWriteNoPermissionError", 513),("NSFileWriteInvalidFileNameError",
517),("NSFileWriteUnsupportedSchemeError", 51,("NSFileWriteOutOfSpaceError",
640),("NSKeyValueValidationError", 1024),("NSFormattingError",
204,("NSUserCancelledError", 3072),("NSFileErrorMinimum",
0),("NSFileErrorMaximum", 1023),("NSValidationErrorMinimum",
1024),("NSValidationErrorMaximum", 2047),("NSFormattingErrorMinimum",
204,("NSFormattingErrorMaximum", 2559)])

I'm a complete beginner to Hasell, and at this point I'm a bit stuck.

Any help would be much appreciated!


- Charlie

More information about the Glasgow-haskell-users mailing list