[Haskell-cafe] named pipe interface

Serge D. Mechveliani mechvel at botik.ru
Fri Jan 13 18:25:12 CET 2012


On Fri, Jan 13, 2012 at 04:34:37PM +0100, Chadda?? Fouch?? wrote:
> On Thu, Jan 12, 2012 at 7:53 PM, Serge D. Mechveliani <mechvel at botik.ru> wrote:
> > People,
> >
> > (I wonder: is this for  beginners at haskell.org ?)
> 
> I don't think so.
> 
> >
> > I need to organize a  string interface  for a Haskell function
> > Main.axiom  and a C program
> >                            fifoFromA.c
> >
> > via a pair of  named pipes  (in Linux, UNIX).
> > The pipes are created before running, by the commands   > mkfifo toA
> >                                                        > mkfifo fromA
> >
> > Main.axiom  outputs a  string  to  toA  and inputs the respond string
> >                                            from  fromA  as the result.
> > fifoFromA  inputs a string from  toA,
> >           converts it to the string  resStr,  outputs resStr to  fromA.
> >
>  Now that seems interesting, but just to be clear : did you choose
> this solution (and why won't you use the FFI instead) or is this just
> to see how to work it out ?


Because it is a direct and the simplest approach. Why does one need a
foreign language, if all the needed functions are in the standard 
Haskell library?

Sergei.



More information about the Haskell-Cafe mailing list