[Haskell-cafe] named pipe interface
Serge D. Mechveliani
mechvel at botik.ru
Fri Jan 13 20:29:35 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:
> > [..]
> > 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 ?
I am trying to interface my large DoCon program for algebra to (a much
larger algebra program) Axiom (the FriCAS license allows this).
And for many reasons, there is no real way for this except the
string interface. Further, the first candidate for the string interface
is Unix named pipes.
If the GHC IO cannot sufficiently work with named pipes, I would return
to the attempt with the Foreign Function Interface and C <-> C exchange.
Sergei.
mechvel at botik.ru
More information about the Glasgow-haskell-users
mailing list