Haskell <-> C/C++ comunication (sockets/pipes?)

Jorge Adriano jadrian@mat.uc.pt
Wed, 26 Sep 2001 00:29:02 +0100


Hi all, 
I was thinking about making some GUIs in Qt/KDE for some haskell applications 
(compiled with ghc). 
My first idea was to simply run haskell applications with some args using the 
GUI and get the results from some file or something like that.
Anyway someone told me that a better idea would be to use pipes to enable the 
GUI to comunicate with the application. I checked the ghc libs and there was 
a 
pipe function, but I would need named pipes here (right?) since the two 
processes are not related. I didn't found any function for that in the ghc 
libs... is there one?

I was also told that another (better way) to do this would be to use sockets.
I've worked a little bit with posix stuff (fork, pipes, etc) but I never 
worked 
with sockets.

I was thinking about using named pipes if that's possible, anyway, Id like to 
know what you think. Is possible. Is sockets a good solution? better? worth 
the trouble of learning how to use them?
Any better ideas?

J.A.

PS: Good luck to the GUI task force ;)