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 <[email protected]> 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
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to