From: David C. <dw...@dw...> - 2005-10-05 06:08:32
|
> > - (BOOL)writeToFile:(NSString *)path options:(unsigned) > writeOptionsMask error:(NSError **)errorPtr; > > What should be the Haskell type of this? > > NSString a -> CUInt -> (Bool, NSError ()) ? As there is a possibility that this error is null, (i.e., no error), perhaps it should be: NSString a -> CUInt -> (Bool, Maybe NSError ()) Whether this should be the pattern in the general case, I do not know, but it seems like it (c|sh)ould be supported. What about instances where we have an in/out parameter? (Can't think of anything specifically in cocoa, but a lot of low-level c-code structs have this when passing pointers.) Those circumstances would have to be hand-added to the bindings, I believe. Any possibility of turning them into IORefs? David |