HOOGJsn_a c d e fgh il m n o  p rs t uvw xy lEjg h()->zAllYAny8 BlockReason+BoolCCharCClockCDevmCDoubleCFloatCInosCInt+CIntMaxCIntPtrCLDoubleBCLLongCLongCModejCOff"CPidCPtrdiffCSCharJCShort CSigAtomicCSizerCSsize*CTimeCUCharCUInthCUIntMax CUIntPtrCULLongCULongHCUShortCWchar CalendarTimeChanCharx ClockTimekComplex` ConsoleEvent@Constr7 ConstrRep.DataRep%DataTypeDay Double Dynamic E12 E6 Either Errno Exception Fd: Fixity1 Float GeneralCategory HashData IO Id Inserts Int Int16 Int32k Int64R Int89 IntPtr Integer Lexeme Maybe Month_ NestedAtomicallyF NoMethodError- NonTermination Ordering P PatternMatchFail Permissions QSem QSemN ReadP ReadPrec RecConErrori RecSelErrorP RecUpdError7 STM StableName TVar ThreadId ThreadStatus TimeDiff Timeout Unique Version Word{ Word16b Word32I Word640 Word8 WordPtrZipList[::][]j TraversableFoldable Applicative AlternativeMonadFix MonadPlusFunctorMonadFunctor Applicative ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq PrintfArgDataStorable PrintfArgDataStorable PrintfArgDataStorable PrintfArgDataStorable PrintfArgDataStorableEqOrdShowReadTypeableOrdEqTypeableShow ExceptionEqShowReadOrdEqShowOrdEqShowEqOrdTypeable Typeable1 Typeable1 Typeable1FunctorMonadTypeableShow ExceptionTypeableShow ExceptionTypeableShow ExceptionFunctorMonad MonadPlusFunctorMonad MonadPlusTypeableTypeableShowReadOrdEqTypeableShow ExceptionMonad MonadPlusMonoidDataIxTypeableShow ExceptionTypeableShow ExceptionTypeableShow ExceptionShowReadIxBoundedEnumOrdEq TraversableFoldable Applicative AlternativeMonadFix MonadPlusFunctorMonadShowEq PrintfArgDataBitsIx ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq PrintfArgDataStorable PrintfArgDataStorable PrintfArgDataStorable PrintfArgDataStorable PrintfArgDataStorableBitsIxEqFunctor Applicative ApplicativeMonadFixShowEqIxBoundedShowReadEnumOrdEq PrintfArgDataStorableShowEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEqTypeable ExceptionShowEqEq Typeable2 HasResolution HasResolution ExceptionTypeableShow PrintfArgDataStorableShowReadIxBoundedEnumOrdEqShowShowEqShowEqShowEqReadShowEnumOrdEqTypeable Typeable1ShowOrdEq PrintfArgIsCharDataStorableIx Typeable1ShowReadOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeable RealFloatRealFracFloating FractionalRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEq ReadShowTypeable RealFloatRealFracFloating FractionalRealStorableEnumNumOrdEq ReadShowTypeable RealFloatRealFracFloating FractionalRealStorableEnumNumOrdEq ReadShowTypeableRealStorableEnumNumOrdEq ReadShowTypeableRealStorableEnumNumOrdEq ReadShowTypeableBitsIntegralBoundedRealStorableEnumNumOrdEqDataStorableIxShowOrdEqMonoidBoundedShowReadOrdEqMonoidBoundedShowReadOrdEqArrow ArrowChoice ArrowApply ArrowLoopCategoryMonoidDataEqOrdIx ByteCountCString CStringLenCWString CWStringLen ClockTickConIndexDeviceID EpochTimeFileIDFileMode FileOffsetzFilePathmFinalizerEnvPtr: FinalizerPtrIOError IPrLimitMicroPicoPrecProcessGroupID ProcessIDRationalReadS~ SampleVar\ShowSAString4[]Char[]Char[]CharaMVar(,)IntMVaraa[]Char[](,)a[]CharRatioIntegerCPidCPidIntFixedE12FixedE6CLong(,)IntInt IOExceptionaFunPtrPtraIO()envaFunPtrPtrenvPtraIO()[]CharCOffCModeCInoCTimeCDevIntCClock(,)PtrCWcharIntPtrCWchar(,)PtrCCharIntPtrCCharCSize(tg[@gafab/]cFRdNemKfGgFhDiW@j?k?l<m9n6o3p/q/ri+sH%tX ujv/wziplistZipList#%eora#itemo deIOModep*amp;eBdIamUo\ncajdq WrappedMonadrrow WrappedArrowonad WrappedMonadrrow WrappedArrowrd#Word#136}8npOtVr]WordPtrWord84Word642Word326Word16Word#adnesdayDaykWeakWorde6r=sDiKoRnYVersionnps{ehrinterruptAsyncExceptionandle StdStreampe!r(c/a6s=eDlKeRtYt`egrnGeneralCategorydiqueUniqueefrflowArithExceptionin e d e l! e( m/ e6 n= tD ArrayExceptionhS#im"oW"r"u!v!y} c!p e a r e p TypeRepb l e Typeable1w!2d!3Q!4>!5+!6!7! Typeable7 Typeable6 Typeable5 Typeable4 Typeable3 Typeable2 Typeable1o!n!TyCona!r!TVar#!TVar#e!s!d!a!y!Daya "v"e"r"s&"a-"b4"l;"eB" Traversabled^" ClockTimem"ty"l"e"c"a"s"e"l"e"t"t"e"r"GeneralCategorye"d,#l"o"c#a #l#e# TimeLocalei3#f:#fA#TimeDiffr#u_#rf#sm#dt#a{#y#Daye#a#d#b %d$f$iq$k:$r#s#t#a#t#u#s# ThreadStatusu$n $n$i$n!$g($ ThreadStatusiA$lH$lO$eV$d]$AsyncExceptiondx$ThreadId#$ ThreadId#i$n$i$s$h$e$d$ ThreadStatusi$e$d$ ThreadStatusl%o%c!%k(%e/%d6% ThreadStatusa*eA*h)o")pu(t&u%yr%my%b%o%l%Lexemem&n%r%r%o%g%a%t%e%GeneralCategoryd%a%y%DaySumSTad'd''m'o&r:&e&iF&nM&gT&Stringc&rn&eu&p|&DataRepo&n&s&t&r& ConstrRepf&p&STRepSTRefr&a&b&l'e'StorableSTMs.'t5'r<'eC'aJ'mQ' StdStreamb(c'r'tz'e'#'State#r'a'y'STArrayk'o'v'e'r'f'l'o'w'AsyncExceptionl(e(nL(p+(t2(r9( StablePtraS(mZ(ea( StableNamea|(c(e )i(n(g(c(o(m(b(i(n(i(n(g(m(a(r(k(GeneralCategoryGeneralCategorym))e0)e7)x>)cE)eL)pS)tZ)ia)oh)no) SomeExceptione)o)u)t)d)o)w)n) ConsoleEventw)Shows)ShowSl)l*c *o*m*m*a&*n-*d4*CmdSpece*pM*tT*e[*mb*bi*ep*rw*Monthk*f*m*o*d*e*SeekModer*o*m*e*n*d*SeekModem,+t+u+r+d+a+y#+Dayp3+l:+eA+vH+aO+rV+ SampleVara/e+iz+g+h+t+Eithera-c,lx,q ,t+u+r+n+i+n+o+r+d+e+r+ArgOrdera\,u,i,r$,e+,o2,r9,d@,eG,rN,ArgOrderrc,gj,ArgDescra,t,i,v,e,s,e,e,k,SeekModecb-s-u,p,d,e,r,r,o-r- RecUpdErrore#-l*-e1-r8-r?-oF-rM- RecSelErroroi-np-ew-r~-r-o-r- RecConErrordO.l-Realf-w-o-r-l-d- RealWorldl'.r.a.c.RealFraco..a5.t<. RealFloatReadm.p.s.wq.rx.i.t.e.m.o.d.e.IOModeReadSReadPr.e.c.ReadPreco.d/e /IOModetc/w%/c,/o3/m:/mA/aH/nO/dV/CmdSpecLexemeit/o{/Ration/a/l/Rationals/e/m/QSemn/QSemNa2eS2i72o2r90t%0u 0n0c0Lexemer,0Ptre1i81oJ0c|0dV0u]0cd0tk0Producte0s0s0g0h0i0d0 ProcessIDa0n0d0l0e0 ProcessHandler0o1u 1p1i1d 1ProcessGroupIDn1vD1aK1tR1eY1u`1sg1en1GeneralCategoryt1f1a1t1y1p1e1 PrintfTyper1g1 PrintfArgc 2f1i1x2FixityPreco"2l)2Poolc>2oE2PicorZ2ma2i2um2tt2e{2ArgOrders2s2i2o2n2s2 PermissionsrI3t2t2e2r2n2m2a2t3c 3h3f3a!3i(3l/3PatternMatchFailaP3gW3r^3ae3pl3hs3sz3e3p3a3r3a3t3o3r3GeneralCategoryc6p5rN5t 4v3e3r3f3l3o4w 4ArithExceptionh'4e.4r54l5n4p4sK4yR4mY4b`4og4ln4GeneralCategoryu4n4c4t4u4a4t4i4o4n4GeneralCategoryu4m4b4e4r5GeneralCategorye5t$5t+5e25r95GeneralCategorydU5Ordeg5rn5iu5n|5g5Orderinge6t5a5d5i5o5n5OptDescre5s5c5r5OptDescrr6g 6ArgDescrn6p&6u-6n46c;6tB6uI6aP6tW6i^6oe6nl6GeneralCategoryt6o6b6e6r6Monthe:9o6u6m6Numa9b8my8n7r7t'7v6e7m7b7e7r7MonthaS7h37i:7nA7gH7MaybesZ7sa7ih7go7nv7e}7d7GeneralCategorye7p7DataReps8t7e7r7m7i7n7a7t7i7o7n8NonTerminationp%8a,8c38i:8nA8gH8mO8aV8r]8kd8GeneralCategorye8t8h8o8d8e8r8r8o8r8 NoMethodErroru8f8f8e8r8i9n9g9 BufferModer%9g,9ArgDescrsA9tH9eO9dV9a]9td9ok9mr9iy9c9a9l9l9y9NestedAtomicallya\<i8<o:u:v9a9r9MVar#9MVar#t:a:b:l:e$:a:b0:y7:t>:eE:aL:rS:rZ:aa:yh:#o:MutableByteArray#r:r:a:y:#: MutableArray#d;n:a1;d;o:t:h:Monthi;d ;Monoida!;y(;Dayd8;Monadfy;pQ;lX;u_;sf; MonadPlusi;x;MonadFixi;f;i;e;r;l<s;y;m;b;o;l;GeneralCategorye<t<t<e<r#<GeneralCategoryc?<rF<oM<Micror<t<ym<Monthb}<e<Maybeh<s<y<m<b<o<l<GeneralCategoryc<h<Montha?e>i>o=g=s=w=e =r'=c.=a5=s<=eC=lJ=eQ=tX=t_=ef=rm=GeneralCategorys=o=f=p=r=e=c=i=s=i=o=n=ArithExceptiono=f=f= ConsoleEventm>n>e$>b}>s0>e7>p>>aE>rL>aS>tZ>oa>rh>GeneralCategoryu>f>f>e>r>i>n>g> BufferModei>t>Limitfl?t?x>e>m?e?Lexemet?e&?r-?n4?u;?mB?bI?eP?rW?GeneralCategoryts?Eithers?t?Lastl?e?i?s?l?i?Kleislia)@u?l@n@s?t?Maybee @Monthy@Monthn0@u7@a>@rE@yL@MonthdDgwDnBoAp@s@x|@Ixc@s@t@r@i@n@g@IsStringh@a@r@IsCharr@IPrIOe_Am:ArAe$Af+AIORefoAAdHAeOAIOModerAxkAcrAeyApAtAiAoAnA IOExceptionrAoArAIOErrortAyApAeA IOErrorTypedDfChCioCt!BInt #aC1KC35C6C8CcBeBpvBr[BebBpiBDataRept}BrBIntPtrgBeBrBaBlBIntegralrBIntegeroBnBsBtBrC ConstrRepInt84&CInt642JvEJpLJtSJrZJFinalizerEnvPtrezJiKmJoJpJaJtJhJFilePathfJfJsJeJtJ FileOffsetoJdJeKFileModedKFileIDb3Kr:KuAKaHKrOKyVKMonthFd 1~N6rNiFNnMoMpYMqMMrLxKcLiKtKc|Le5LfKsKuKcKcKeKsKsKExitCodeaLi LlLuLr Le'LExitCodexMErrnoEqo`McgMhnMtuMi|MmMeM EpochTimefMLexemecMdMuMmMEnumoMEndolMoMsNiNnNgNmNa#Nr*Nk1NGeneralCategorytMNhTNe[NrbNEitherE62NE12aZQeOiOoNOu2OyNnNa OeNxNcNeNpNtNiNoNnN ExceptionmOiOc!ODynamica9Ol@ODualuoOwZOnaODownbvOl}OeODoublevOiOdOeObOyOzOeOrOoOArithExceptiona%QcPfuPn>Pv PiPcPePi%Pd,PDeviceIDoEPrLPmSPaZPlaPArithExceptiona|PuPlPtPHandlerePiPmPaPlPnPuPmPbPePrPGeneralCategorymQb QeQrQMonthd,Ql3Qo:QcAQkHQDeadlocksQtxQykQDayaQDatarQtQyQpQeQDataTypeeQpQDataRephQpQuQnQcRtRuRaRtRi#Ro*Rn1RGeneralCategorya\c2\d[ft[hE[iZjZl:YmXoVpVrVsTtTu&SwRcSsRtRrRiRnRgRCWStringlReRnR CWStringLenhSaSrSCWcharcTi TlSrnSsAShHSoOSrVSt]SCUShortruSe|SnScSySsSySmSbSoSlSGeneralCategorylSoSnSgSCULongoTnTgTCULLongn'Tt.TCUIntmgTpGTtNTrUTCUIntPtranTxuTCUIntMaxhTaTrTCUChariTmTeTCTimecUhUidUs?UtTrTiTnUgUCStringlUe$Un+U CStringLeniFUzMUeTUCSsizegUzpUewUCSizeaUtUoUmUiUcU CSigAtomicoUrUtUCShorthUaUrUCSChareVaVt#Ve*Vp1ViwVr=VoDVcKVeRVsYVs`V CreateProcessp~VeV StdStreamiVtVrVdViVfVfVCPtrdiffdVCPidfXmXnVitXnWsRWtWrWoWl&WGeneralCategoryc@W ConsoleEventoWt^WConstrrWConstrrWeWpW ConstrReplWeWeWvWeWnWtW ConsoleEventeWcWtXo XrXpXu Xn'Xc.Xt5Xu\oE\cL\kS\CClockaj\rq\CCharl\t\c\e\g\o\r\y\Categoryh\Handlere\n\d\a\r\t]i ]m]e] CalendarTimeiJalT^o^r]u]yO]tV]e]]cd]ok]ur]ny]t] ByteCountf]f]e]r]m]o]d]e] BufferModee]a]k] ConsoleEvento?^u^n^d ^e'^d.^BoundedlF^Boolo[^cb^ki^bae^rz^e^a^s^o^n^ BlockReasond^i`o^n^bO`d`e_fc_m=_o_s^t^m^ BlockReasont_h_e%_r,_ BlockReasonvD_aK_rR_ BlockReasonoj_rq_ex_i_g_n_c_a_l_l_ BlockReasonx_c_e_p_t_i_o_n_ BlockReasone `a`d`m`v&`a-`r4`BlockedOnDeadMVarlV`a]`cd`kk`hr`oy`l`e` BlockReasonn`d`e`f`i`n`i`t`e`l`y`BlockedIndefinitelyu afafaear%ai,an3ag:a BufferModetQasXaBitsbfdflfnepCerbsauagauasataMonths(byanacaeaxacaeapataibo bnbAsyncExceptione/br6bt=biDboKbnRbfYba`bigblnbeubd|bAssertionFailedgdivdrbacobwbArrowaccclfcm6cpczbebrbob ArrowZerolcucs#c ArrowPluso=cnDcaKcdRc ArrowMonadomcotcp{c ArrowLoophcocicccec ArrowChoicepcpclcyc ArrowApplyycArray#fdedxdc$de+dp2dt9di@doGdnNdArrayExceptionArray#t}dhdedxdcdedpdtdidodndArithExceptiondeodrdddedreArgOrderees#ec*er1eArgDescrpherOeiVel]eMontheeltei{eceaeteieveee ApplicativenedemeoedeeeIOModeyeAnygoflbftfefr#fn*fa1ft8fi?fvFfeMf AlternativeAllcfr{fefpfDataRepofnfsftfrf ConstrRepdfrf#fAddr#sfoflgugtgegsge$ge+gk2gSeekMode:Xg]Lg[]:_g]fg[::]){g()gjiqi>ihhhBoolCmdSpec   CreateProcess    StdStream()IOExitCodeIO ProcessHandleIO ProcessHandleHandleHandleHandle(,,,)IOChar[]Char[]ExitCode(,,)IOChar[]IOChar[]MaybeExitCodeMaybeIO  ProcessHandleHandleMaybeHandleMaybeHandleMaybe(,,,)IOChar[]Char[](,)[]MaybeIjflkLkjBool CmdSpec  CreateProcessHandle ProcessHandle StdStream   Char[] HandleMaybeChar[]Maybe Char[][]  Char[]Char[](,)[]Maybe nnnnpnUn:nnnmmmmmmrm^mSmHm5m*mmm m#! " FilePath String FilePathStringStringStringFilePathStringFilePathStringFilePathStringFilePathStringFilePathStringFilePathStringStringString StringString ,ssrrrrrrBr(rrqqqqcq)q qpp}pgpCp)ppoooosoKowaitforprocess^owaitForProcess# usehandleo UseHandle"terminateprocessoterminateProcess!systemosystem stdstreamo StdStreamstd_outpstd_outstd_inpstd_instd_err5pstd_err shellcommandTp ShellCommandshellqpshell runprocessp runProcessruninteractiveprocessprunInteractiveProcessruninteractivecommandprunInteractiveCommand runcommandq runCommandreadprocesswithexitcodeEqreadProcessWithExitCode readprocesssq readProcess rawsystemq rawSystem rawcommandq RawCommand processhandleq ProcessHandleprocessqProcessprocessprocrprocinherit4rInherit getprocessexitcodeYrgetProcessExitCode envzrenv cwdrcwd createprocessr CreateProcess createProcess createpiper CreatePipecmdspecrCmdSpeccmdspeccmd"sCmd close_fds:s close_fds#0&Ƥ!B40/ (Ie~`O=|ayuNuswaitForProcesswaitForProcess ::  ProcessHandle ->  IO ExitCodeat?t ProcessHandleIOExitCodeWaits for the specified process to terminate, and returns its exit code. GHC Note: in order to call waitForProcess without blocking all the other threads in the system, you must compile the program with -threaded.  UseHandle UseHandle :: Handle ->  StdStreamuuHandle StdStreamUse the supplied Handle terminateProcessterminateProcess ::  ProcessHandle -> IO ()Iv-v ProcessHandleIO()Attempts to terminate the specified process. This function should not be used under normal circumstances - no guarantees are given regarding how cleanly the process is terminated. To check whether the process has indeed terminated, use getProcessExitCode. On Unix systems, terminateProcess sends the process the SIGKILL signal. On Windows systems, the Win32 TerminateProcess function is called, passing an exit code of 1. Note: on Windows, if the process was a shell command created by createProcess with shell, or created by runCommand or runInteractiveCommand, then terminateProcess will only terminate the shell, not the command itself. On Unix systems, both processes are in a process group and will be terminated together. systemsystem :: String ->  IO ExitCodeyyStringIOExitCodesComputation system cmd returns the exit code produced when the operating system runs the shell command cmd. This computation may fail with
  • PermissionDenied: The process has insufficient privileges to perform the operation.
  • ResourceExhausted: Insufficient resources are available to perform the operation.
  • UnsupportedOperation: The implementation does not support system calls.
On Windows, system passes the command to the Windows command interpreter (CMD.EXE or COMMAND.COM), hence Unixy shell tricks will not work. systemsystem :: String ->  IO ExitCode||StringIOExitCodesComputation system cmd returns the exit code produced when the operating system runs the shell command cmd. This computation may fail with
  • PermissionDenied: The process has insufficient privileges to perform the operation.
  • ResourceExhausted: Insufficient resources are available to perform the operation.
  • UnsupportedOperation: The implementation does not support system calls.
On Windows, system passes the command to the Windows command interpreter (CMD.EXE or COMMAND.COM), hence Unixy shell tricks will not work.  StdStreamdata  StdStreamKstd_outstd_out ::  CreateProcess ->  StdStream CreateProcess StdStreamHow to determine stdout std_instd_in ::  CreateProcess ->  StdStreamE( CreateProcess StdStreamHow to determine stdin std_errstd_err ::  CreateProcess ->  StdStream΀ CreateProcess StdStreamHow to determine stderr  ShellCommand ShellCommand :: String -> CmdSpecP<StringCmdSpec*a command line to execute using the shell shellshell :: String ->  CreateProcessȁString CreateProcessConstruct a CreateProcess record for passing to createProcess, representing a command to be passed to the shell.  runProcess runProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] ->  Maybe Handle ->  Maybe Handle ->  Maybe Handle -> IO ProcessHandleXFilePath[]StringMaybeFilePathMaybe[](,)StringStringMaybeHandleMaybeHandleMaybeHandleIO ProcessHandleRuns a raw command, optionally specifying Handles from which to take the stdin, stdout and stderr channels for the new process (otherwise these handles are inherited from the current process). Any Handles passed to runProcess are placed immediately in the closed state. Note: consider using the more general createProcess instead of runProcess. runInteractiveProcess runInteractiveProcess :: FilePath -> [String] -> Maybe FilePath -> Maybe [(String, String)] -> *IO (Handle, Handle, Handle, ProcessHandle)lFilePath[]StringMaybeFilePathMaybe[](,)StringStringIO(,,,)HandleHandleHandle ProcessHandleRuns a raw command, and returns Handles that may be used to communicate with the process via its stdin, stdout and stderr respectively. For example, to start a process and feed a string to its stdin:
(inp,out,err,pid) <- runInteractiveProcess "..."
forkIO (hPutStr inp str)
The Handles are initially in binary mode; if you need them to be in text mode then use hSetBinaryMode. runInteractiveCommandrunInteractiveCommand :: String -> *IO (Handle, Handle, Handle, ProcessHandle)~=StringIO(,,,)HandleHandleHandle ProcessHandle,Runs a command using the shell, and returns Handles that may be used to communicate with the process via its stdin, stdout, and stderr respectively. The Handles are initially in binary mode; if you need them to be in text mode then use hSetBinaryMode.  runCommand runCommand :: String -> IO ProcessHandle%StringIO ProcessHandle Runs a command using the shell. readProcessWithExitCode readProcessWithExitCode :: FilePath -> [String] -> String -> IO (ExitCode, String, String):FilePath[]StringStringIO(,,)ExitCodeStringStringreadProcessWithExitCode creates an external process, reads its standard output and standard error strictly, waits until the process terminates, and then returns the ExitCode of the process, the standard output, and the standard error. readProcess and readProcessWithExitCode are fairly simple wrappers around createProcess. Constructing variants of these functions is quite easy: follow the link to the source code to see how readProcess is implemented.  readProcess  readProcess :: FilePath -> [String] -> String ->  IO StringӎFilePath[]StringStringIOStringreadProcess forks an external process, reads its standard output strictly, blocking until the process terminates, and returns either the output string, or, in the case of non-zero exit status, an error code, and any output. Output is returned strictly, so this is not suitable for interactive applications. Users of this function should compile with -threaded if they want other Haskell threads to keep running while waiting on the result of readProcess.
> readProcess "date" [] []
Right "Thu Feb  7 10:03:39 PST 2008\n"
The argumenst are:
  • The command to run, which must be in the $PATH, or an absolute path
  • A list of separate command line arguments to the program
  • A string to pass on the standard input to the program.
 rawSystem rawSystem :: String -> [String] ->  IO ExitCodexOString[]StringIOExitCodeThe computation rawSystem cmd args runs the operating system command cmd in such a way that it receives as arguments the args strings exactly as given, with no funny escaping or shell meta-syntax expansion. It will therefore behave more portably between operating systems than system. The return codes and possible failures are the same as for system.  rawSystem rawSystem :: String -> [String] ->  IO ExitCodeqString[]StringIOExitCodeThe computation rawSystem cmd args runs the operating system command cmd in such a way that it receives as arguments the args strings exactly as given, with no funny escaping or shell meta-syntax expansion. It will therefore behave more portably between operating systems than system. The return codes and possible failures are the same as for system.  RawCommand RawCommand :: FilePath -> [String] -> CmdSpecFilePath[]StringCmdSpec7the filename of an executable with a list of arguments  ProcessHandledata  ProcessHandle,procproc :: FilePath -> [String] ->  CreateProcessFilePath[]String CreateProcessxConstruct a CreateProcess record for passing to createProcess, representing a raw command with arguments. InheritInherit ::  StdStreamxl StdStreamInherit Handle from parent getProcessExitCodegetProcessExitCode ::  ProcessHandle -> IO (Maybe ExitCode)3 ProcessHandleIOMaybeExitCodeThis is a non-blocking version of waitForProcess. If the process is still running, Nothing is returned. If the process has exited, then Just e is returned where e is the exit code of the process. Subsequent calls to getProcessExitStatus always return Just ExitSuccess, regardless of what the original exit code was. envenv ::  CreateProcess -> Maybe [(String, String)]J CreateProcessMaybe[](,)StringStringBOptional environment (otherwise inherit from the current process) cwdcwd ::  CreateProcess -> Maybe FilePathޛ CreateProcessMaybeFilePath;Optional path to the working directory for the new process  createProcess createProcess ::  CreateProcess -> Handles, or just inherited from the parent (the default.) The details of how to create the process are passed in the CreateProcess record. To make it easier to construct a CreateProcess, the functions proc and shell are supplied that fill in the fields with default values which can be overriden as needed. createProcess returns (mb_stdin_hdl, mb_stdout_hdl, mb_stderr_hdl, p), where
  • if std_in == CreatePipe, then mb_stdin_hdl will be Just h, where h is the write end of the pipe connected to the child process's stdin.
  • otherwise, mb_stdin_hdl == Nothing
Similarly for mb_stdout_hdl and mb_stderr_hdl. For example, to execute a simple ls command:
r <- createProcess (proc "ls" [])
To create a pipe from which to read the output of ls:
(_, Just hout, _, _) <-
    createProcess (proc "ls" []){ std_out = CreatePipe }
To also set the directory in which to run ls:
(_, Just hout, _, _) <-
    createProcess (proc "ls" []){ cwd = Just "\home\bob",
                                  std_out = CreatePipe }
 CreateProcess CreateProcess :: CmdSpec -> Maybe FilePath -> Maybe [(String, String)] ->  StdStream ->  StdStream ->  StdStream -> Bool ->  CreateProcess CmdSpecMaybeFilePathMaybe[](,)StringString StdStream StdStream StdStreamBool CreateProcess CreateProcessdata  CreateProcess¤ CreatePipe CreatePipe ::  StdStream StdStreamCreate a new pipe cmdspeccmdspec ::  CreateProcess -> CmdSpecu CreateProcessCmdSpec-Executable & arguments, or shell command CmdSpecdata CmdSpec close_fds close_fds ::  CreateProcess -> Bool[C CreateProcessBoolNClose all file descriptors except stdin, stdout and stderr in the new process processpackage process֦VProcess libraries This package contains libraries for dealing with system processes. Processmodule System.Processc<Operations for creating and interacting with sub-processes. Cmdmodule System.CmdΧExecuting an external command. This module provides a simple interface for executing external commands. For a more complex, but more powerful, interface, see the System.Process module. SystemCmdSystemProcessèprocess1.0.1.1Ehttp://hackage.haskell.org/packages/archive/process/1.0.1.1/doc/html/Bhttp://hackage.haskell.org/cgi-bin/hackage-scripts/package/process