[Haskell-cafe] createProcess problem

Vasili I. Galchin vigalchin at gmail.com
Mon Apr 27 19:00:52 EDT 2009


Hello,


I am trying to use createProcess. Following is a small fragment. I am trying
to run a program called blastall (a bio-informatics program). It is kind of
like mv/cp/ln on Unix platforms (where the executable examines the program,
i.e. arg[0], and then provides appropriate behavior/semantics). In the case
of blastall, it alters its behavior based on the -p(program) CLI
argument.WSo in the following it should provide nucleotide behavior ... that
is what the 'n' on the end of blastn means.

import System.Process


main = do
     handle <- runProcess
               "blastall"     -- executable
               ["-p blastn"]  -- CLI args
               Nothing        -- optional cwd
               Nothing        -- optional env
               Nothing        -- optional stdin
               Nothing        -- optional stdout
               Nothing        -- optional stderr
     return ()


When I run this program with ghci, blastall is not a happy camper. It is
complaining about "-p blastn":
[NULL_Caption] ERROR: Program name undefined: " blastn" <<< the space
between the double quote and 'b' is really there!!!
[NULL_Caption] ERROR: Program name undefined: " blastn"

Yet if I run 'blastall -p blastn' from the DOS prompt no errors(I will try
tonight on my Linux machine).

If I try 'blastall -p bozo" from the DOS prompt I get the same two errors as
when I run my test program using ghci.

I feel that it has something to do with double quotes in Haskell ...
probably something obviously silly that I am doing.

Any ideas?

Kind regards, Vasili
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090427/115074f7/attachment.htm


More information about the Haskell-Cafe mailing list