News for hackers. Stuff that matters.
Re:GHC 7.8.1 released by chc on Wednesday April 09, 2014 @05:32PM (#7562595)
There is a similar problem with objc_msgSend in C: Methods with certain argument types can't be called with a normal objc_msgSend(). Instead, you need to create a specifically typed function pointer and assign objc_msgSend to it. I think a similar solution would be necessary with Haskell.
Re:GHC 7.8.1 released by iand675 on Wednesday April 09, 2014 @07:10PM (#7563149)
I'd appreciate seeing a link to an example of this. I put a decent amount of work (a few years ago) into writing some bindings in Haskell to the objc runtime, but ended up shelving it until I could come up with a satisfactory solution to the variadic function dilemma.
Re:GHC 7.8.1 released by chc on Wednesday April 09, 2014 @07:51PM (#7563331)
Here are a couple of Stack Overflow answers that illustrate how you do it in Objective-C:

http://stackoverflow.com/a/2573949

http://stackoverflow.com/a/18689338

If you're interested in the nitty-gritty of how objc_msgSend works, bbum from Apple wrote up a great low-level walkthrough a few years back: http://www.friday.com/bbum/2009/12/18/objc_msgsend-part-1-th...