[Haskell-cafe] little help please
Nicolas Wu
nicolas.wu at gmail.com
Thu Mar 18 14:56:12 EDT 2010
This compiles:
import System.Environment(getArgs)
import System.Process(readProcessWithExitCode)
import System.Exit(exitWith,ExitCode(ExitSuccess))
main = do
args <- getArgs
(ecode,out,err) <- readProcessWithExitCode
"c:\\Perl64\\bin\\perl.exe" ("C:\\Program
Files\\MySQL\\scripts\\mysql_config.pl" : args) ""
if ecode == ExitSuccess
then return out
else return err
exitWith ecode
I had trouble with the spacing you had when I pasted your code, and
also changed the imports so that ExitSuccess was being imported.
All the best,
Nick
On Thu, Mar 18, 2010 at 6:46 PM, Roderick Ford <developer at live.com> wrote:
> this will be EASY for you to fix, I am sure... what the heck am I doing
> wrong:
> import System.Environment(getArgs)
> import System.Process(readProcessWithExitCode)
> import System.Exit(exitWith)
> main = do
> args <- getArgs
> (ecode,out,err) <- readProcessWithExitCode "c:\\Perl64\\bin\\perl.exe"
> ("C:\\Program Files\\MySQL\\scripts\\mysql_config.pl" : args) ""
> if ecode == System.Exit.ExitCode.ExitSuccess
> then return out
> else return err
> exitWith ecode
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
More information about the Haskell-Cafe
mailing list