h&       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Errno provided by libuv(c) Winterland, 2017-2018BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?,jZ-IOtoo many linkskZ-IOno such device or addresslZ-IO end of filemZ-IO unknown errornZ-IOcross-device link not permittedoZ-IOtext file is busypZ-IOconnection timed outqZ-IOno such processrZ-IO invalid seeksZ-IO-cannot send after transport endpoint shutdowntZ-IOread-only file systemuZ-IOresult too largevZ-IOprotocol wrong type for socketwZ-IOprotocol not supportedxZ-IOprotocol erroryZ-IO broken pipezZ-IOoperation not permitted{Z-IO!operation not supported on socket|Z-IOsocket operation on non-socket}Z-IOdirectory not empty~Z-IOnot a directoryZ-IOsocket is not connectedZ-IOfunction not implementedZ-IOno space left on deviceZ-IOprotocol not availableZ-IOmachine is not on the networkZ-IOnot enough memoryZ-IOno such file or directoryZ-IOno such deviceZ-IOno buffer space availableZ-IOfile table overflowZ-IOnetwork is unreachableZ-IOnetwork is downZ-IO name too longZ-IOmessage too longZ-IOtoo many open filesZ-IO#too many symbolic links encounteredZ-IO illegal operation on a directoryZ-IOsocket is already connectedZ-IO i/o errorZ-IOinvalid argumentZ-IOinterrupted system callZ-IOhost is unreachableZ-IOfile too largeZ-IO#bad address in system call argumentZ-IOfile already existsZ-IOdestination address requiredZ-IOconnection reset by peerZ-IOconnection refusedZ-IO software caused connection abortZ-IOinvalid Unicode characterZ-IOoperation canceledZ-IOresource busy or lockedZ-IObad file descriptorZ-IOconnection already in progressZ-IOsocket type not supportedZ-IO%service not available for socket typeZ-IOresolved protocol is unknownZ-IOargument buffer overflowZ-IOunknown node or serviceZ-IO no addressZ-IO out of memoryZ-IOai_family not supportedZ-IOpermanent failureZ-IOrequest canceledZ-IOinvalid value for hintsZ-IObad ai_flags valueZ-IOtemporary failureZ-IOaddress family not supportedZ-IO resource temporarily unavailableZ-IOaddress family not supportedZ-IOaddress not availableZ-IOaddress already in useZ-IOpermission deniedZ-IOargument list too longZ-IOReturns the error message for the given error code. Leaks a few bytes of memory when you call it with an unknown error code.Z-IOReturns the error name for the given error code. Leaks a few bytes of memory when you call it with an unknown error code.hijklmnopqrstuvwxyz{|}~ih~}|{zyxwvutsrqponmlkjExtensible IO exceptions(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?3Z-IOIO exceptions informations.Z-IO8the errno name, e.g. EADDRINUSE, etc. empty if no errno.Z-IOdescription for this io error, can be errno description, or some custom description if no errno.Z-IOlightweight partial call-stackZ-IOThe root type of all io exceptions, you can catch all io exception by catching this root type.Z-IOThrow  if allocation return a  .Z-IOThrow appropriate IO exception if return value < 0 (libuv's convention).Z-IOThrow appropriate IO exception if return value < 0, otherwise ignore the result.Z-IO4Throw appropriate IO exception if condition is true.Z-IOThrow appropriate IO exception if condition is true, otherwise ignore the result.Z-IOThrow  with name ECLOSED& and description 'resource is closed'.Z-IOSTM version of .Z-IOThrow " with custom name and description.Z-IOTry to unwrap a value from  , throw OtherError name desc with desc == toText e if 'Left e'.Z-IOTry to unwrap a value from  , throw OtherError name desc if  . Z-IO+Check if the given exception is synchronousZ-IOSame as upstream ,, but will not catch asynchronous exceptionsZ-IO"Ingore all synchronous exceptions.Z-IO.Throw a UV Exception with given libuv's errno.Z-IOthe allocation actionZ-IO the IO actionZ-IO the IO action  !"#$%&'()*+-,21436587=9:<;?>A@BCDHEGFIJKLMNOPQTSRUZWYXa\^_`[]bcVhijklmnopqrstuvwxyz{|}~  !"#$%&'()*+-,21436587=9:<;?>A@BCDHEGFIJKLMNOPQTSRSUZWYXa\^_`[]cVb TCP/UDP socket address API(c) Winterland, 2018BSDwinterland1989@gmail.com experimental non-portableNone,  "%&(/015;<=?@Z-IO Port number.Use the Num0 instance (i.e. use a literal) to create a --  PortNumber value.1 :: PortNumber1read "1" :: PortNumber1show (12345 :: PortNumber)"12345"50000 < (51000 :: PortNumber)True50000 < (52000 :: PortNumber)True50000 + (10000 :: PortNumber)60000Z-IO"Data type for interface addresses.Z-IO'Independent of endianness. For example ::1 is stored as  (0, 0, 0, 1).For direct manipulation prefer  and .7JSON instance encode ipv6 address into an array with 8   octets.Z-IO'Independent of endianness. For example  127.0.0.1 is stored as (127, 0, 0, 1).For direct manipulation prefer  and .7JSON instance encode ipv4 address into an array with 4   octets.Z-IO&IPv4 or IPv6 socket address, i.e. the  sockaddr_in or  sockaddr_in6 struct.Example on JSON instance: > JSON.encodeText $ ipv6 "3731:54:65fe:2::a8" 9090 "{"addr":[14129,84,26110,2,0,0,0,168],"port":9090,"flow":0,"scope":0}" > JSON.encodeText $ ipv4 "128.14.32.1" 9090 "{"addr":[128,14,32,1],"port":9090}" Z-IOUsed in getAddrInfo hints, for any type can be returned by getAddrInfoZ-IOInternet Protocol version 6Z-IOinternetwork: UDP, TCP, etcZ-IO unspecifiedZ-IOConvert a string containing an IPv4 addresses to a binary structure3This is partial function, wrong address will throw  exception.Z-IOConvert a string containing an IPv6 addresses to a binary structure3This is partial function, wrong address will throw  exception.Z-IO 0.0.0.0Z-IO 255.255.255.255Z-IO 255.255.255.255Z-IO  127.0.0.1Z-IO  224.0.0.0Z-IO  224.0.0.1Z-IO  224.0.0.255Z-IO Converts  to representation-independent IPv4 quadruple. For example for  127.0.0.1 the function will return (127, 0, 0, 1) regardless of host endianness.Z-IOConverts IPv4 quadruple to .Z-IO ::Z-IO ::1Z-IOconvert  to octets.Z-IOconvert  from octets.Z-IOPass  to FFI as pointer.Z-IOPass  to FFI as pointer.,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-IOAllocate space for sockaddr_storage and pass to FFI.Z-IOAllocate space for sockaddr_storage and pass to FFI.,USE THIS FUNCTION WITH UNSAFE FFI CALL ONLY.Z-IOGets address information about the network interfaces on the system. Z-IO :0Buffered IO interface(c) Dong Han, 2017-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?W6Z-IO+Output device with buffer, NOT THREAD SAFE!A  should not be used in multiple threads, there's no locking mechanism to protect buffering state.A * device should only be used with a single , If multiple  s are opened on a same ( device, the output will be interleaved.Z-IO*Input device with buffer, NOT THREAD SAFE!A  should not be used in multiple threads, there's no locking mechanism to protect buffering state.A * device should only be used with a single , If multiple  s are opened on a same $ device, the behaviour is undefined.Z-IOInput and Output device should return 0 on EOF. should not return until all data are written (may not necessarily flushed to hardware, that should be done in device specific way).Z-IO Output device should not return until all data are written (may not necessarily flushed to hardware, that should be done in device specific way).Z-IO Input device should return 0 on EOF.Z-IOOpen a new buffered input with  as buffer size.Z-IO Open a new buffered output with  as buffer size.Z-IO8Open a new buffered output with given buffer size, e.g. .Size smaller than  will be taken as .Z-IO7Open a new buffered input with given buffer size, e.g. .Z-IO*Open a new buffered input and output with  as buffer size.Z-IOOpen a new buffered input and output with given buffer size, e.g. .Z-IORequest bytes chunk from .$The buffering logic is quite simple:If we have pushed back bytes, directly return it, otherwise we read using buffer size. If we read N bytes, and N is larger than half of the buffer size, then we freeze buffer and return, otherwise we copy buffer into result and reuse buffer afterward.Z-IO Request UTF8   chunk from .The buffer size must be larger than 4 bytes to guarantee decoding progress(which is guaranteed by .). If there're trailing bytes before EOF, an  with name  EINCOMPLETE5 will be thrown, if there're invalid UTF8 bytes, an  with name  EINVALIDUTF8 will be thrown.`Z-IOClear already buffered input.Z-IORead exactly N bytes.'If EOF reached before N bytes read, an  with name  EINCOMPLETE will be thrown.Z-IORead all chunks from a  until EOF.,This function will loop read until meet EOF( device return  .), Useful for reading small file into memory.Z-IORead all chunks from a , and concat chunks together.,This function will loop read until meet EOF( device return  .), Useful for reading small file into memory.Z-IO*Push bytes back into buffer(if not empty).Z-IORead buffer and parse with   style function.This function will continuously draw data from input before parsing finish. Unconsumed bytes will be returned to buffer.Throw  with name EPARSE if parsing failed.Z-IORead buffer and parse with  .This function will continuously draw data from input before parsing finish. Unconsumed bytes will be returned to buffer.Throw  with name EPARSE if parsing failed.Z-IORead until reach a magic bytes, return bytes(including the magic bytes).Empty bytes indicate EOF. if EOF is reached before meet a magic byte, partial bytes are returned.  /----- readToMagic ----- \ /----- readToMagic -----\ ... +------------------+-------+-----------------+-------+ | ... | magic | ... | magic | ... +------------------+-------+-----------------+-------+ Z-IO)Read to a linefeed ('n' or 'rn'), return Bytes before it.Return bytes don't include linefeed, empty bytes indicate empty line,   indicate EOF. If EOF is reached before meet a line feed, partial line is returned.  /--- readLine ---\ discarded /--- readLine ---\ discarded / ... +------------------+---------+------------------+---------+ | ... | \r\n/\n | ... | \r\n/\n | ... +------------------+---------+------------------+---------+ Z-IOWrite   into buffered handle.If buffer is empty and bytes are larger than half of buffer, directly write bytes, otherwise copy bytes to buffer.If buffer is not empty, then copy bytes to buffer if it can hold, otherwise write buffer first, then try again.Z-IOWrite   into buffered handle then flush the buffer into output device (if buffer is not empty).Equivalent to add a  after write.Z-IODirectly write   into buffered handle.Run   with buffer if it can hold, write to device when buffer is full.Z-IODirectly write   into buffered handle then flush the buffer into output device (if buffer is not empty).Equivalent to add a  after write.Z-IOHide the subprocess GUI window that would normally be created.This option is only meaningful on Windows systems. On Unix it is silently ignored.Z-IOHide the subprocess console window that would normally be created.This option is only meaningful on Windows systems. On Unix it is silently ignored.Z-IO:Hide the subprocess window that would normally be created.This option is only meaningful on Windows systems. On Unix it is silently ignored.Z-IO+Spawn the child process in a detached stateThis will make it a process group leader, and will effectively enable the child to keep running after the parent exits.Z-IODo not wrap any arguments in quotes, or perform any other escaping, when converting the argument list into a command line string.This option is only meaningful on Windows systems. On Unix it is silently ignored.Z-IOSet the child process' user id.This is not supported on Windows, uv_spawn() will fail and set the error to UV_ENOTSUP.Z-IOSet the child process' user id.This is not supported on Windows, uv_spawn() will fail and set the error to UV_ENOTSUP.Z-IO End of file.Z-IO%Current position of the file pointer.Z-IOBeginning of the file.Z-IO$Open the file for write-only access.Z-IOIf the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero.Z-IOThe file is temporary and should not be flushed to disk if possible.Note " is only supported on Windows via FILE_ATTRIBUTE_TEMPORARY.Z-IOThe file is opened for synchronous IO. Write operations will complete once all data and all metadata are flushed to disk.Note  is supported on Windows via FILE_FLAG_WRITE_THROUGH.Z-IOOpen the symbolic link itself rather than the resource it points to.Z-IOThe file is temporary and should not be flushed to disk if possible.Note " is only supported on Windows via FILE_ATTRIBUTE_TEMPORARY.Z-IOAccess is intended to be sequential from beginning to end. The system can use this as a hint to optimize file caching.Note " is only supported on Windows via FILE_FLAG_SEQUENTIAL_SCAN.Z-IO$Open the file for read-write access.Z-IO#Open the file for read-only access.Z-IOAccess is intended to be random. The system can use this as a hint to optimize file caching.Note " is only supported on Windows via FILE_FLAG_RANDOM_ACCESS.Z-IOOpen the file in nonblocking mode if possible. (Definitely not useful in Z-IO)Note  is not supported on Windows. (Not useful on regular file anyway)Z-IO.If the path is a symbolic link, fail the open.Note  is not supported on Windows.Z-IOIf the path identifies a terminal device, opening the path will not cause that terminal to become the controlling terminal for the process (if the process does not already have one). (Not sure if this flag is useful)Note  is not supported on Windows.Z-IO9Do not update the file access time when the file is read.Note  is not supported on Windows.Z-IO$Atomically obtain an exclusive lock.Note UV_FS_O_EXLOCK is only supported on macOS and Windows. (libuv: Changed in version 1.17.0: support is added for Windows.)Z-IOIf the 8 flag is set and the file already exists, fail the open.!Note In general, the behavior of $ is undefined if it is used without 3. There is one exception: on Linux 2.6 and later,  can be used without  if pathname refers to a block device. If the block device is in use by the system (e.g., mounted), the open will fail with the error EBUSY.Z-IOThe file is opened for synchronous IO. Write operations will complete once all data and a minimum of metadata are flushed to disk.Note  is supported on Windows via FILE_FLAG_WRITE_THROUGH.Z-IOIf the path is not a directory, fail the open. (Not useful on regular file)Note  is not supported on Windows.Z-IOFile IO is done directly to and from user-space buffers, which must be aligned. Buffer size and address should be a multiple of the physical sector size of the block device, (DO NOT USE WITH Z-IO's  BufferedIO)Z-IO1The file is created if it does not already exist.Z-IOThe file is opened in append mode. Before each write, the file offset is positioned at the end of the file.Z-IO1This is the file type constant of a regular file.Z-IO3This is the file type constant of a directory file.Z-IO2This is the file type constant of a symbolic link.Z-IOThis is the file type mask.Z-IODefault mode for open, 0x755.Z-IO9Default mode for file open, 0x666(readable and writable).Z-IO$00001 others have execute permissionZ-IO"00002 others have write permissionZ-IO!00004 others have read permissionZ-IO400007 others have read, write and execute permissionZ-IO"00010 group has execute permissionZ-IO 00020 group has write permissionZ-IO00040 group has read permissionZ-IO200070 group has read, write and execute permissionZ-IO!00100 user has execute permissionZ-IO00200 user has write permissionZ-IO00400 user has read permissionZ-IO>00700 user (file owner) has read, write and execute permissionZ-IO-Peek loop data pointer from uv loop pointer.Z-IO uv_check_tZ-IO uv_handle_t libuv operations(c) Winterland, 2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?(Z-IOAlternative data type for storing times. typedef struct { int64_t tv_sec; int32_t tv_usec; } uv_timeval64_t;Z-IOData type for CPU information.Z-IO millisecondsZ-IO millisecondsZ-IO millisecondsZ-IO millisecondsZ-IO millisecondsZ-IO(Data type for password file information.Z-IOThe value is "%Y-%m-%dT%H:%M:%S%z". This should be used with  and .Z-IOFormat for web (RFC 2616).The value is "%a, %d %b %Y %H:%M:%S GMT". This should be used with  and .Z-IOFormat for e-mail (RFC 5322).The value is "%a, %d %b %Y %H:%M:%S %z". This should be used with  and .Z-IO Formatting g to   in local time.$This is a wrapper for strftime_l(), e is ignored. The result depends on the TZ environment variable.Z-IO Formatting g to   in GMT.$This is a wrapper for strftime_l(), e is ignored.4formatSystemTimeGMT webDateFormat $ MkSystemTime 0 0"Thu, 01 Jan 1970 00:00:00 GMT"let ut = MkSystemTime 100 200%let str = formatSystemTimeGMT "%s" ut%let ut' = parseSystemTimeGMT "%s" str ((==) `on` systemSeconds) ut ut'True$((==) `on` systemNanoseconds) ut ut'FalseZ-IOParsing   to g interpreting as localtime.This is a wrapper for strptime_l(). Many implementations of strptime_l() do not support %Z and some implementations of strptime_l() do not support %z, either. systemNanoSeconds is always set to 0.2The result depends on the TZ environment variable.  > setEnv TZ "Africa/Algiers" parseSystemTime simpleDateFormat "1970-01-01 00:00:00" MkSystemTime {systemSeconds = 0, systemNanoseconds = 0} > setEnv TZ "Asia/Shanghai" parseSystemTime simpleDateFormat "1970-01-01 00:00:00" MkSystemTime {systemSeconds = -28800, systemNanoseconds = 0} Z-IOParsing   to g< interpreting as GMT. This is a wrapper for strptime_l(). systemNanoSeconds is always set to 0.parseSystemTimeGMT webDateFormat "Thu, 01 Jan 1970 00:00:00 GMT"7MkSystemTime {systemSeconds = 0, systemNanoseconds = 0} Z-IOHelper handling memory allocation for formatSystemTime and formatSystemTimeGMT.gfedgfed "Low resolution (0.1s) timing wheel(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=? Z-IOsee  on  ..This exception is not a sub-exception type of , but a sub-exception type of  .Z-IOTimer registered by  or . Z-IOA simple timing wheelZ-IO=Create new low resolution timer manager on capability change.Since low resolution timer manager is not hooked into RTS, you're responsible to call this function after you call  > to match timer manager array size with new capability number.This is not a must though, when we fetch timer manager we always take a modulo.Z-IOGet a  for current thread.Z-IO+Check if a timer manager's wheel is turning#This is mostly for testing purpose.Z-IORegister a new timer on current capability's timer manager, start the timing wheel if it's not turning.If the action could block, you may want to run it in another thread. Example to kill a thread after 10s: 4 registerLowResTimer 100 (forkIO $ killThread tid) Z-IO  ( t action)Z-IOSame as %, but allow you choose timer manager.Z-IO2Query how many seconds remain before timer firing.;A return value <= 0 indictate the timer is firing or fired.Z-IO+Cancel a timer, return the remaining ticks.6This function have no effect after the timer is fired.Z-IO void . cancelLowResTimerZ-IO similar to <, this function put a limit on time which an IO can consume.,Note timeoutLowRes is also implemented with Z underhood, which can have some surprising effects on some devices, e.g. use  with reading or writing on UVStreams may close the UVStream: once a reading or writing is not able to be done in time.Z-IO Similar to , but throw an async  & to current thread instead of return   if timeout.Z-IO Similiar to  , suspends the current thread for a given number of deciseconds. Z-IOCheck if low resolution timer manager loop is running, start loop if not. Z-IOStart low resolution timer loop, the loop is automatically stopped if there's no more new registrations. Z-IOScan the timeout queue in current tick index, and move tick index forward by one.Z-IO-Cache result of an IO action for give time t.This combinator is useful when you want to share IO result within a period, the action will be called on demand, and the result will be cached for t milliseconds.One common way to get a shared periodical updated value is to start a seperate thread and do calculation periodically, but doing that will stop system from being idle, which stop idle GC from running, and in turn disable deadlock detection, which is too bad. This function solves that.Z-IO-Throttle an IO action without caching result.The IO action will run at leading edge. i.e. once run, during following (t/10)s throttled action will no-ops./Note the action will run in the calling thread.Z-IO Similar to  but run action in trailing edgeThe IO action will run at trailing edge. i.e. no matter how many times throttled action are called, original action will run only once after (t/10)s.4Note the action will be run in a new created thread.Z-IOtimeout in unit of 0.1sZ-IO3the action you want to perform, it should not blockZ-IOtimeout in unit of 0.1sZ-IO3the action you want to perform, it should not blockZ-IOa low resolution timer managerZ-IOtimeout in unit of 0.1sZ-IO3the action you want to perform, it should not blockZ-IOtimeout in unit of 0.1sZ-IOtimeout in unit of 0.1sZ-IOcache time in unit of 0.1sZ-IOthe original IO actionZ-IOthrottled IO actionZ-IOcache time in unit of 0.1sZ-IOthe original IO actionZ-IOthrottled IO actionZ-IOthe original IO actionZ-IOthrottled IO actionThe Resource monad(c) Dong Han, 2017BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?Z-IO8Simple resource pool where lookup via key is not needed.Z-IO!A high performance resource pool.The Pool is first divided by GHC runtime capabilities, each capability maintains a map from key to living resource list. Resource are fetched from living list first, create on demand if there's no living resource. Z-IOhow to get a resource Z-IO0max number for resource we keep alive after used Z-IO(max idle time for resource we keep alive Z-IO(A entry linked-list annotated with size.Z-IOA  is an   action which acquires some resource of type a and also returns a finalizer of type IO () that releases the resource.The only safe way to use a  is  and , You should not use the  field directly, unless you want to implement your own resource management. In the later case, you should L  since some resource initializations may assume async exceptions are masked. + instance is provided so that you can lift   computation inside %, this is convenient for propagating  around since many   computations carry finalizers.3A convention in Z-IO is that functions returning a  should be named in initXXX format, users are strongly recommended to follow this convention.3There're two additional guarantees we made in Z-IO:8All resources in Z-IO can track its own liveness, throw  exception using  or ) when used after resource is closed.5All resources' clean up action in Z-IO is idempotent.Library authors providing initXXX1 are also encouraged to provide these guarantees.Z-IOCreate  from create and release action.Note, resource doesn't open resource itself, resource is created when you use with / with'.Z-IOCreate  from create and release action.This function is useful when you want to add some initialization and clean up action inside  monad.Z-IOCreate a new resource and run some computation, resource is guarantee to be closed.Be careful, don't leak the resource through the computation return value because after the computation finishes, the resource is already closed.Z-IOCreate a new resource and run some computation, resource is guarantee to be closed.The difference from with is that the computation will receive an extra close action, which can be used to close the resource early before the whole computation finished, the close action can be called multiple times, only the first call will clean up the resource.Z-IODump the status of pool.Z-IO&Initialize a resource pool with given Like other initXXX functions, this function won't open a resource pool until you use .Z-IOOpen resource inside a given resource pool and do some computation.This function is thread safe, concurrently usage will be guaranteed to get different resource. If exception happens during computation, resource will be closed(not return to pool).Z-IO Initialize a .Z-IOOpen resource with , see Z-IOmaximum number of resources per local pool per key to be maintained.Z-IOamount of time after which an unused resource can be released (in seconds).Z-IOCancel uv async function (actions which can be cancelled with  uv_cancel) with best effort, if the action is already performed, run an extra clean up action.Z-IO Exception safe uv request helperThis helper will run a libuv's async function, which will return a libuv side's slot, then we will accommodate a  " in block table and wait on that  , until the async function finished or an exception is received, in later case we will call  : to cancel the on-going async function with best efforts,Z-IO Same with  but disgard the result.Z-IO Same with ) but apply an convert function to result.The convert function have all access to the returned value including negative ones, it's convert funtions's responsiblity to throw an exception if appropriate.Z-IO Same with , but will also run an extra cleanup function if async exception hit this thread but the async action is already successfully performed, e.g. release result memory.Z-IO1Fork a new GHC thread with active load-balancing.Using libuv based IO solution has a disadvantage that file handlers are bound to certain uv_loop, thus certain uv mananger/capability. Worker threads that migrate to other capability will lead contention since various APIs here is protected by manager's lock, this makes GHC's work-stealing strategy unsuitable for certain workload, such as a webserver. we solve this problem with simple round-robin load-balancing: forkBa will automatically distribute new threads to all capabilities in round-robin manner. Thus its name forkBa(lance).Z-IO uv managerZ-IOuv slotZ-IObuffer pointerZ-IO buffer lengthZ-IOconvert function Standard Streams and TTY devices(c) Dong Han, 2018-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?ɗZ-IO!Standard input and output streamsWe support both regular file and TTY based streams, when initialized  is called to decide which type of devices are connected to standard streams.Note  is not thread safe, you shouldn't use them without lock. For the same reason you shouldn't use stderr directly, use  ! module instead. Z-IO*similar to UVStream, first field is is_tty Z-IOsimilar to UVFileZ-IO2Is this standard stream connected to a TTY device?Z-IO-Get the standard stream's OS file descriptor.Z-IOThe global stdin stream.Z-IOThe global stdout stream.0If you want a buffered device, consider use the . first. If you want to write logs, don't use  directly, use  ! instead.Z-IOThe global stderr stream.0If you want a buffered device, consider use the 0 first. | If you want to write logs, don't use  directly, use  ! instead.Z-IO,A global buffered stdin stream protected by  .0If you want a buffered device, consider use the  first.Z-IO-A global buffered stdout stream protected by  .%If you want to write logs, don't use  directly, use  ! instead.Z-IO-A global buffered stderr stream protected by  .%If you want to write logs, don't use  directly, use  ! instead.Z-IOChange terminal's mode if stdin is connected to a terminal, do nothing if stdout is not connected to TTY.Z-IO>Set stdin to raw mode before run IO, set back to normal after.Z-IOGet terminal's output window size in (width, height) format, return (-1, -1) if stdout is not connected to TTY.Z-IOPrint a Print' and flush to stdout, without linefeed.Z-IOPrint a Builder' and flush to stdout, without linefeed.Z-IOPrint a Print& and flush to stdout, with a linefeed.Z-IO Similar to ,   debug tool.Z-IOPrint a Builder& and flush to stdout, with a linefeed.Z-IO'Read a line from stdin(in normal mode).This function will throw ECLOSED when meet EOF, which may cause trouble if stdin is connected to a file, use  instead.   Ansi control code sequences(c) Winterland, 2017-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?ѧZ-IO24-bit RGB colorZ-IO8-bit palette color, see 4https://en.wikipedia.org/wiki/ANSI_escape_code#8-bitZ-IOANSI's eight standard colorsZ-IOCode to move the cursor to the specified column. The column numbering is 1-based (that is, the left-most column is numbered 1).Z-IOCode to move the cursor to the specified position (row and column). The position is 1-based (that is, the top-left corner is at row 1 column 1).Z-IO=XTerm control sequence to set the Icon Name and Window Title.Z-IOItalicize some textZ-IO!Add single underline to some textZ-IOless than 150 per minuteZ-IO6MS-DOS ANSI.SYS, 150+ per minute; not widely supportedZ-IOAka Hide, not widely supported.Z-IO=Swap foreground and background colors, inconsistent emulationZ-IOColorized some textZ-IO)Colorized some text with background colorZ-IOColorized some textZ-IO)Colorized some text with background colorZ-IOColorized some textZ-IO)Colorized some text with background color Z-IO+List of parameters for the control sequenceZ-IO/Character(s) that identify the control functionZ-IO%Number of lines or characters to moveZ-IO%Number of lines or characters to moveZ-IO%Number of lines or characters to moveZ-IO%Number of lines or characters to moveZ-IONumber of lines to moveZ-IONumber of lines to moveZ-IO1-based column to move toZ-IO1-based row to move toZ-IO1-based column to move toZ-IONumber of lines to scroll byZ-IONumber of lines to scroll byZ-IONew Icon Name and Window TitleZ-IO)List of sgr code for the control sequenceUDP servers and clients(c) Dong Han, 2018BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?Z-IOReceiving buffering config.Z-IO"maximum size of a received messageZ-IOhow many messages we want to receive per uv loop, inside each uv_run, we do batch receiving, increase this number can improve receiving performance, at the cost of memory and potential GHC thread starving.Z-IOWrapper for a connected .Z-IO UDP options.Though technically message length field in the UDP header is a max of 65535, but large packets could be more likely dropped by routers, usually a packet(IPV4) with a payload <= 508 bytes is considered safe.Z-IOmaximum size of sending bufferZ-IOdo we want bind a local address before receiving & sending? set to Nothing to let OS pick a random one.Z-IO UDP socket.UDP is not a sequential protocol, thus not an instance of 'Input/Output'. Message are received or sent individually, UDP socket is NOT thread safe! Use    in multiple threads.Z-IO UDPConfig 512 NothingZ-IOInitialize a UDP socket.Z-IO!Get the local IP and port of the .Z-IOAssociate the UDP handle to a remote address and port, so every message sent by this handle is automatically sent to that destinationZ-IO9Disconnect the UDP handle from a remote address and port.Z-IOGet the remote IP and port on .Z-IO(Send a UDP message with a connected UDP. WARNING: A  with errno + will be thrown if message is larger than  sendMsgSize.Z-IO%Send a UDP message to target address. WARNING: A  with errno + will be thrown if message is larger than  sendMsgSize.Z-IOSet IP multicast loop flag. Makes multicast packets loop back to local sockets.Z-IOSet the multicast ttl.Z-IO7Set the multicast interface to send or receive data on. Z-IOSet broadcast on or off. Z-IOSet the time to live. Z-IO%Set membership for a multicast group. Z-IO5Set membership for a source-specific multicast group. Z-IO UDPRecvConfig 512 6 Z-IORecv UDP message within a loopLoop receiving can be faster since it can reuse receiving buffer. Unlike TCP server from Z.IO.Network.TCPserver, UDP worker function is called on current haskell thread instead of a forked one, if you have heavy computations to do within the worker function, consider using %, or a producer-consumer architecture Z-IORecv messages from UDP socket, return source address if available, and a   to indicate if the message is partial (larger than receive buffer size). Z-IO1 ~ 255 Z-IO(Multicast address to set membership for.Z-IOInterface address.Z-IOUV_JOIN_GROUP | UV_LEAVE_GROUP Z-IO(Multicast address to set membership for.Z-IOInterface address.Z-IOSource address.Z-IOUV_JOIN_GROUP | UV_LEAVE_GROUP# #   =Miscellaneous functions(environment variables, metrics, etc.)(c) Dong Han, 2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=? Z-IO Computation   returns a list of the program's command line arguments (including the program path).This is different from base's "#> since result includes the program path(more like C's *argv). Z-IO#Retrieves the environment variable.*Warning: This function is not thread safe. Z-IO5Retrieves the environment variable specified by name.*Warning: This function is not thread safe. Z-IO WINDOWS6If the first separator is a backslash -> WINDOWS3If the first separator is a slash -> UNIX3If the last segment starts with a dot -> UNIX6If the last segment contains a dot -> WINDOWS3If nothing was found to determine the style -> UNIX Z-IO$Gets the path style currently using. Z-IO/Configures which path style is used afterwards.This function configures which path style is used. call to this function is only required if a non-native behaviour is required. The style defaults to   on windows builds and to   otherwise. Z-IO5Get the default character that separates directories. Z-IO*Get characters that separates directories. Z-IO(Test if a character is a path separator. Z-IOThe character that is used to separate the entries in the $PATH environment variable.&Windows: searchPathSeparator is ASCII ;&Unix: searchPathSeparator is ASCII : Z-IO(Test if a character is a file separator. Z-IOFile extension characterExtSeparator is ASCII . Z-IO2Test if a character is a file extension separator. Z-IO Get the basename of a file path.:The basename is the last segment of a path. For instance, logs is the basename of the path  /var/logs. PathBasename /my/path.txtpath.txt /my/path.txt/path.txt/my/path.txt////path.txt file_name file_name....../""C:pathtest.txttest.txt Z-IO$Changes the basename of a file path. 8> changeBaseName "foo/bar.txt" "qux.png" "foo/qux.png" Z-IODetermines the root of a path.This function determines the root of a path by finding it@s length. The root comes before the first segment of the path. For example, C:\ is the root of C:\folder\file.txt. It always starts at the submitted path. If the path has no root,   will be returned. StylePathRootUNIX/test//UNIXtest.txt""UNIX C:\test.txt""UNIX\folder\""WINDOWS /test.txt/WINDOWS \test.txt\WINDOWS C:\test.txtC:\WINDOWS\\server\folder\data\\server\folder\WINDOWS\\.\folder\data\\.\WINDOWS\\?\folder\data\\?\WINDOWS C:test.txtC:WINDOWS..\hello\world.txt"" Z-IO Changes the root of a file path. > changeBaseName "C:\\test.txt" "D:\\" -- windows style "D:\test.txt" Z-IO6Split file path into (root, segments, basename) tuple.-Root may be empty, segments are separated by   and never be empty if any. Z-IO.Determine whether the path is absolute or not.This function checks whether the path is an absolute (fully qualified) path or not. A path is considered to be absolute if the root ends with a separator. StylePathResultUNIX/test/TrueUNIXtest.txtFalseUNIX C:\test.txtFalseUNIX\folder\FalseWINDOWS /test.txtTrueWINDOWS \test.txtTrueWINDOWS C:\test.txtTrueWINDOWS\\server\folder\dataTrueWINDOWS\\.\folder\dataTrueWINDOWS\\?\folder\dataTrueWINDOWS C:test.txtFalseWINDOWS..\hello\world.txtFalse Z-IO.Determine whether the path is relative or not.This function checks whether the path is a relative path or not. A path is considered to be relative if the root does not end with a separator. StylePathResultUNIX/test/FalseUNIXtest.txtTrueUNIX C:\test.txtTrueUNIX\folder\TrueWINDOWS /test.txtFalseWINDOWS \test.txtFalseWINDOWS C:\test.txtFalseWINDOWS\\server\folder\dataFalseWINDOWS\\.\folder\dataFalseWINDOWS\\?\folder\dataFalseWINDOWS C:test.txtTrueWINDOWS..\hello\world.txtTrue Z-IOJoins two paths together. StylePath APath BResultUNIX hello/there../world hello/worldUNIX/first/second /first/secondUNIXhello...UNIX hello/there..helloUNIXhellothere hello/thereWINDOWSthis\C:\..\..\is\a\test\ is\a\testWINDOWS C:\this\path C:\is\a\test\C:\this\path\C:\is\a\testWINDOWS C:\this\pathC:\..\is\a\test\C:\this\path\is\a\testWINDOWS \\s1\unc\path \\s2\unc\pa\\s1\unc\pa\s2\unc\path Z-IOJoins multiple paths together.This function generates a new path by joining multiple paths together. It will remove double separators, and unlike  <, it permits the use of multiple relative paths to combine. Z-IOCreates a normalized version of the path. The following will be true for the normalized path:"../" will be resolved."./" will be removed.8double separators will be fixed with a single separator.#separator suffixes will be removed.InputOutput/var/var/var/logs/test/../..//var!/var/logs/test/../../../../../..// rel/../../../var////logs//test//var/logs/test /var/././././/var /var/./logs/.//test/..//..///////var Z-IO#Finds common portions in two paths. StyleBaseOtherResultUNIX/test/abc/../foo/bar /test/foo/har/test/abc/../fooUNIX /test/foo/har/test/abc/../foo/bar /test/fooUNIX /test/abc.txt test/abc.txt""UNIX/""""UNIX/this///is/a//test/this//is/a///file /this///is/aUNIX/this/is/a/test /this/is/a/ /this/is/aUNIX/this/is/a/test /this/is/a /this/is/aUNIX/this/is/a/test/this/is/a/string /this/is/aWINDOWSC:/abc/test.txtC:/C:/WINDOWSC:/abc/test.txtC:/def/test.txtC:/WINDOWSC:/test/abc.txtD:/test/abc.txt"" Z-IO+Generates an absolute path based on a base.This function generates an absolute path based on a base path and another path. It is guaranteed to return an absolute path. If the second submitted path is absolute, it will override the base path.BasePathResult /hello/there../../../../..///hello//../there test//thing/there/test/thing hello/there/test/test hello/theretest/hello/there/test /hello/there/test/test /hello/there../hello Z-IO*Generates a relative path based on a base.This function generates a relative path based on a base path and another path. It determines how to get to the submitted path, starting from the base directory.Note the two arguments must be both absolute or both relative, otherwise an  will be thrown. StyleBasePathResultUNIX/../..//../../.UNIX /path/same/path/not_same/ho/.. ../not_sameUNIX/path/not_same/ho/.. /path/same../sameUNIX /path/same/path/same/ho/...UNIX/path/same/ho/.. /path/same.UNIX /path/same /path/same.UNIX/path/long/one/path/long/one/twotwoUNIX/path/long/one/two/path/long/one..UNIX./this/is/path_one./this/is/path_two ../path_twoUNIX/this/is/path_one/this/is/path_two ../path_twoWINDOWS C:/path/same D:/path/same"" Z-IO#Split the extension of a file path. changeExtension "foo/bar.txt" "png" "foo/bar.png" Z-IOGet a list of paths in the $PATH variable. Z-IOreturn (dir, basename) Z-IO new base name Z-IOreturn (root, rest path) Z-IO new base name Z-IOreturn (root, segments) Z-IO9The base path which will be compared with the other path.Z-IO6The other path which will compared with the base path. Z-IOThe absolute base path on which the relative path will be applied.Z-IO9The relative path which will be applied on the base path. Z-IO6The base path from which the relative path will start.Z-IO6The target path where the relative path will point to. Z-IO file pathZ-IOreturn (file, ext) Z-IO file path Z-IO file path Z-IO file path Z-IO/The path which will be used to make the change.Z-IO7The extension which will be placed within the new path. Filesystem IO using threadpool(c) Dong Han, 2017-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?E< Z-IO - and its operations are NOT thread safe, use MVar   in multiple threads.'Note this is a differet data type from Z.IO.FileSystem 's one, the  and , instance use thread pool version functions.libuv implements read and write method with both implict and explict offset capable. Implict offset interface is provided by  / 5 instances. Explict offset interface is provided by   /  . Z-IOFile bundled with offset.Reading or writing using  / / instance will automatically increase offset.  - and its operations are NOT thread safe, use MVar   in multiple threads.The notes on linux   applied to   too. Z-IO$Create a file offset bundle from an  . Z-IOGet current offset. Z-IOChange current offset. Z-IO)Quickly open a file and read its content. Z-IO6Quickly open a file and read its content as UTF8 text. Z-IO+Quickly open a file and write some content. Z-IO8Quickly open a file and write some content as UTF8 text. Z-IOQuickly open a file and read its content as a JSON value. Throw  with name EPARSE if JSON value is not parsed. Z-IO+Quickly open a file and write a JSON Value. Z-IOFind all files and directories within a given directory with a predicator.  import Z.IO.FileSystem.FilePath (splitExtension) -- find all haskell source file within current dir scandirRecursively "." (\ p _ -> (== ".hs") . snd <$> splitExtension p) Z-IODoes given path exist? Z-IOReturns   if the argument file exists and is either a file or a symbolic link to a file, and   otherwise. Z-IOReturns   if the argument directory exists and is either a directory or a symbolic link to a directory, and   otherwise. Z-IO!If given path is a symbolic link? Z-IO?If given path is a directory or a symbolic link to a directory? Z-IO5If given path is a file or a symbolic link to a file? Z-IO Shortcut to '\ st -> stMode st .&. S_IFMT == S_IFLNKNote you should use   to get the link's stat. Z-IO Shortcut to '\ st -> stMode st .&. S_IFMT == S_IFDIR Z-IO Shortcut to '\ st -> stMode st .&. S_IFMT == S_IFREG Z-IO#Make a temporary file under system  $ and automatically clean after used.This is a shortcut to  , the file name use Z-IO-* as prefix, and will be removed after use.$withResource initTempFile $ printStd("/var/folders/3l/cfdy03vd1gvd1x75gg_js7280000gn/T/Z-IO-bYgZDX",File 13) Z-IO(Make a temporary directory under system  $ and automatically clean after used.This is a shortcut to  , the directory name use Z-IO- as prefix, and will be removed(with files within it) after use.#withResource initTempDir $ printStd"/tmp/Z-IO-xfWR0L" Z-IOReturn File fd. Z-IOIf fd is -1 (closed), throw  ECLOSED. Z-IOSet file's system offset.Equivalent to  #https://linux.die.net/man/3/lseek64 lseek64(3). Z-IORead file with given offset,Read length may be smaller than buffer size. Z-IOWrite buffer to file4This function will loop until all bytes are written. Note on linux files opened with , behave differently since this function use pwrite: POSIX requires that opening a file with the O_APPEND flag should have no effect on the location at which pwrite() writes data. However, on Linux, if a file is opened with O_APPEND, pwrite() appends data to the end of the file, regardless of the value of offset. Z-IO init a file , which open a file when used.Resource closing will wait for the referencing counter goes down to zero (no reading or writing is in process), which can be a problem if you are using multiple readers or writers in multiple threads. In that case you have to stop all reading or writing thread if you don't want to block the resource thread. Z-IOEquivalent to  http://linux.die.net/man/2/mkdirmkdir(2).Note mode is currently not implemented on Windows. On unix you should set execute bit if you want the directory is accessable, e.g. 0o777. Z-IO,Recursive directory creation function. Like  , but makes all intermediate-level directories needed to contain the leaf directory.Equivalent to mkdir -p,Note mode is currently not implemented on Windows. On unix you should set execute bit if you want the directory is accessable(so that child folder can be created), e.g. . Z-IOEquivalent to  !http://linux.die.net/man/2/unlink unlink(2). Z-IOEquivalent to mkdtemp"http://linux.die.net/man/3/mkdtempCreates a temporary directory in the most secure manner possible. There are no race conditions in the directory@s creation. The directory is readable, writable, and searchable only by the creating user ID. The user of mkdtemp() is responsible for deleting the temporary directory and its contents when done with it.Note: the argument is the prefix of the temporary directory, so no need to add XXXXXX ending. Z-IOEquivalent to mkstemp4https://man7.org/linux/man-pages/man3/mkstemp.3.htmlThe file is created with permissions 0600, that is, read plus write for owner only. The returned   provides both read and write access to the file. The file is opened with the  flag, guaranteeing that the caller is the process that creates the file.After resource is used, the file will be closed, and removed if keep param is  . Z-IOEquivalent to  http://linux.die.net/man/2/rmdirrmdir(2).Note this function may inherent OS limitations such as argument must be an empty folder. Z-IORemoves a file or directory at path together with its contents and subdirectories. Symbolic links are removed without affecting their targets. If the path does not exist, nothing happens. Z-IOEquivalent to  "http://linux.die.net/man/3/scandir scandir(3).Note Unlike scandir(3), this function does not return the @.@ and @..@ entries.Note On Linux, getting the type of an entry is only supported by some file systems (btrfs, ext2, ext3 and ext4 at the time of this writing), check the  #http://linux.die.net/man/2/getdents getdents(2) man page. Z-IOEquivalent to http://linux.die.net/man/2/statstat(2) Z-IOEquivalent to http://linux.die.net/man/2/lstatlstat(2) Z-IOEquivalent to http://linux.die.net/man/2/statstat(2)Return   instead of throwing  if the file doesn't exist. Z-IOEquivalent to http://linux.die.net/man/2/lstatlstat(2)Return   instead of throwing  if the link doesn't exist. Z-IOEquivalent to http://linux.die.net/man/2/fstatfstat(2) Z-IOEquivalent to  !http://linux.die.net/man/2/rename rename(2).Note On Windows if this function fails with UV_EBUSY, UV_EPERM or UV_EACCES, it will retry to rename the file up to four times with 250ms wait between attempts before giving up. If both path and new_path are existing directories this function will work only if target directory is empty. Z-IOEquivalent to  http://linux.die.net/man/2/fsyncfsync(2). Z-IOEquivalent to  $http://linux.die.net/man/2/fdatasync fdatasync(2). Z-IOEquivalent to  $http://linux.die.net/man/2/ftruncate ftruncate(2). Z-IO$Copies a file from path to new_path.Warning: If the destination path is created, but an error occurs while copying the data, then the destination path is removed. There is a brief window of time between closing and removing the file where another process could access the file. Z-IOEquivalent to  !http://linux.die.net/man/2/access access(2)- on Unix. Windows uses GetFileAttributesW(). Z-IOEquivalent to  http://linux.die.net/man/2/chmodchmod(2). Z-IOEquivalent to  !http://linux.die.net/man/2/fchmod fchmod(2). Z-IOEquivalent to  http://linux.die.net/man/2/utimeutime(2). libuv choose   type due to cross platform concerns, we only provide micro-second precision. Z-IOEquivalent to  4https://man7.org/linux/man-pages/man3/futimes.3.html futime(3).Same precision notes with  . Z-IOEquivalent to  4https://man7.org/linux/man-pages/man3/lutimes.3.html lutime(3).Same precision notes with  . Z-IOEquivalent to  http://linux.die.net/man/2/linklink(2). Z-IOEquivalent to  "http://linux.die.net/man/2/symlink symlink(2).| Note On Windows the flags parameter can be specified to control how the symlink will be created.,: indicates that path points to a directory.<: request that the symlink is created using junction points.+On other platforms these flags are ignored. Z-IOEquivalent to  #http://linux.die.net/man/2/readlink readlink(2). Z-IOEquivalent to  #http://linux.die.net/man/3/realpath realpath(3) on Unix. Windows uses  https://msdn.microsoft.com/en-us/library/windows/desktop/aa364962(v=vs.85).aspxGetFinalPathNameByHandle.Warning This function has certain platform-specific caveats that were discovered when used in Node.macOS and other BSDs: this function will fail with UV_ELOOP if more than 32 symlinks are found while resolving the given path. This limit is hardcoded and cannot be sidestepped.Windows: while this function works in the common case, there are a number of corner cases where it doesn@t:Paths in ramdisk volumes created by tools which sidestep the Volume Manager (such as ImDisk) cannot be resolved.-Inconsistent casing when using drive letters.&Resolved path bypasses subst@d drives.While this function can still be used, it@s not recommended if scenarios such as the above need to be supported. The background story and some more details on these issues can be checked  *https://github.com/nodejs/node/issues/7726here.Note This function is not implemented on Windows XP and Windows Server 2003. On these systems, UV_ENOSYS is returned. Z-IOEquivalent to  http://linux.die.net/man/2/chownchown(2). Z-IOEquivalent to  !http://linux.die.net/man/2/fchown fchown(2). Z-IOEquivalent to  !http://linux.die.net/man/2/lchown lchown(2). Z-IOthe fileZ-IO closed flag Z-IOthe file we're readingZ-IOinitial offset Z-IObufferZ-IO buffer sizeZ-IO2file offset, pass -1 to use default(system) offsetZ-IO read length Z-IObufferZ-IO buffer sizeZ-IO2file offset, pass -1 to use default(system) offset Z-IOOpening flags, e.g.  .|. Z-IOSets the file mode (permission and sticky bits), but only if the file was created, see . Z-IO&directory where temp file are created.Z-IO A file path prefix template, no XXXXXX needed.Z-IOKeep file after used? Z-IOatime, i.e. access timeZ-IOmtime, i.e. modify time Z-IOatime, i.e. access timeZ-IOmtime, i.e. modify time      Filesystem IO(c) Dong Han, 2017-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?t < Z-IO - and its operations are NOT thread safe, use MVar   in multiple threadslibuv implements read and write method with both implict and explict offset capable. Implict offset interface is provided by  / 5 instances. Explict offset interface is provided by   /  . Z-IOFile bundled with offset.Reading or writing using  / / instance will automatically increase offset.  - and its operations are NOT thread safe, use MVar   in multiple threads.The notes on linux   applied to   too. Z-IO$Create a file offset bundle from an  . Z-IOGet current offset. Z-IOChange current offset. Z-IO)Quickly open a file and read its content. Z-IO6Quickly open a file and read its content as UTF8 text. Z-IO+Quickly open a file and write some content. Z-IO8Quickly open a file and write some content as UTF8 text. Z-IOQuickly open a file and read its content as a JSON value. Throw  with name EPARSE if JSON value is not parsed. Z-IO+Quickly open a file and write a JSON Value. Z-IOFind all files and directories within a given directory with a predicator.  import Z.IO.FileSystem.FilePath (splitExtension) -- find all haskell source file within current dir scandirRecursively "." (\ p _ -> (== ".hs") . snd <$> splitExtension p) Z-IODoes given path exist? Z-IOReturns   if the argument file exists and is either a file or a symbolic link to a file, and   otherwise. Z-IOReturns   if the argument directory exists and is either a directory or a symbolic link to a directory, and   otherwise. Z-IO!If given path is a symbolic link? Z-IO?If given path is a directory or a symbolic link to a directory? Z-IO5If given path is a file or a symbolic link to a file? Z-IO Shortcut to '\ st -> stMode st .&. S_IFMT == S_IFLNKNote you should use   to get the link's stat. Z-IO Shortcut to '\ st -> stMode st .&. S_IFMT == S_IFDIR Z-IO Shortcut to '\ st -> stMode st .&. S_IFMT == S_IFREG Z-IO#Make a temporary file under system  $ and automatically clean after used.This is a shortcut to  , the file name use Z-IO-* as prefix, and will be removed after use.$withResource initTempFile $ printStd("/var/folders/3l/cfdy03vd1gvd1x75gg_js7280000gn/T/Z-IO-bYgZDX",File 13) Z-IO(Make a temporary directory under system  $ and automatically clean after used.This is a shortcut to  , the directory name use Z-IO- as prefix, and will be removed(with files within it) after use.#withResource initTempDir $ printStd"/tmp/Z-IO-xfWR0L" Z-IOReturn File fd. Z-IOIf fd is -1 (closed), throw  ECLOSED. Z-IOSet file's system offset.Equivalent to  #https://linux.die.net/man/3/lseek64 lseek64(3). Z-IORead file with given offset,Read length may be smaller than buffer size. Z-IOWrite buffer to file4This function will loop until all bytes are written. Note on linux files opened with , behave differently since this function use pwrite: POSIX requires that opening a file with the O_APPEND flag should have no effect on the location at which pwrite() writes data. However, on Linux, if a file is opened with O_APPEND, pwrite() appends data to the end of the file, regardless of the value of offset. Z-IO init a file , which open a file when used.Resource closing is thread safe, on some versions of OSX, repeatly open and close same file 0 may result in shared memory object error, use  to avoid that. Z-IO0Create a directory named path with numeric mode .Equivalent to  http://linux.die.net/man/2/mkdirmkdir(2).Note mode is currently not implemented on Windows. On unix you should set execute bit if you want the directory is accessable, e.g. 0o777. Z-IO,Recursive directory creation function. Like  , but makes all intermediate-level directories needed to contain the leaf directory.Equivalent to mkdir -p,Note mode is currently not implemented on Windows. On unix you should set execute bit if you want the directory is accessable(so that child folder can be created), e.g. . Z-IOEquivalent to  !http://linux.die.net/man/2/unlink unlink(2). Z-IOEquivalent to "http://linux.die.net/man/3/mkdtempmkdtempCreates a temporary directory in the most secure manner possible. There are no race conditions in the directory@s creation. The directory is readable, writable, and searchable only by the creating user ID. The user of mkdtemp() is responsible for deleting the temporary directory and its contents when done with it.Note: the argument is the prefix of the temporary directory, so no need to add XXXXXX ending. Z-IOEquivalent to 4https://man7.org/linux/man-pages/man3/mkstemp.3.htmlmkstempThe file is created with permissions 0600, that is, read plus write for owner only. The returned   provides both read and write access to the file. The file is opened with the  flag, guaranteeing that the caller is the process that creates the file.After resource is used, the file will be closed, and removed if keep param is  . Z-IOEquivalent to  http://linux.die.net/man/2/rmdirrmdir(2).Note this function may inherent OS limitations such as argument must be an empty folder. Z-IORemoves a file or directory at path together with its contents and subdirectories. Symbolic links are removed without affecting their targets. If the path does not exist, nothing happens. Z-IOEquivalent to  "http://linux.die.net/man/3/scandir scandir(3).Note Unlike scandir(3), this function does not return the @.@ and @..@ entries.Note On Linux, getting the type of an entry is only supported by some file systems (btrfs, ext2, ext3 and ext4 at the time of this writing), check the  #http://linux.die.net/man/2/getdents getdents(2) man page. Z-IOEquivalent to http://linux.die.net/man/2/statstat(2) Z-IOEquivalent to http://linux.die.net/man/2/lstatlstat(2) Z-IOEquivalent to http://linux.die.net/man/2/statstat(2)Return   instead of throwing  if the file doesn't exist. Z-IOEquivalent to http://linux.die.net/man/2/lstatlstat(2)Return   instead of throwing  if the link doesn't exist. Z-IOEquivalent to http://linux.die.net/man/2/fstatfstat(2) Z-IOEquivalent to  !http://linux.die.net/man/2/rename rename(2).Note On Windows if this function fails with UV_EBUSY, UV_EPERM or UV_EACCES, it will retry to rename the file up to four times with 250ms wait between attempts before giving up. If both path and new_path are existing directories this function will work only if target directory is empty. Z-IOEquivalent to  http://linux.die.net/man/2/fsyncfsync(2). Z-IOEquivalent to  $http://linux.die.net/man/2/fdatasync fdatasync(2). Z-IOEquivalent to  $http://linux.die.net/man/2/ftruncate ftruncate(2). Z-IO$Copies a file from path to new_path.Warning: If the destination path is created, but an error occurs while copying the data, then the destination path is removed. There is a brief window of time between closing and removing the file where another process could access the file. Z-IOEquivalent to  !http://linux.die.net/man/2/access access(2) on Unix."Windows uses GetFileAttributesW(). Z-IOEquivalent to  http://linux.die.net/man/2/chmodchmod(2). Z-IOEquivalent to  !http://linux.die.net/man/2/fchmod fchmod(2). Z-IOEquivalent to  http://linux.die.net/man/2/utimeutime(2). libuv choose   type due to cross platform concerns, we only provide micro-second precision. Z-IOEquivalent to  4https://man7.org/linux/man-pages/man3/futimes.3.html futime(3).Same precision notes with  . Z-IOEquivalent to  4https://man7.org/linux/man-pages/man3/lutimes.3.html lutime(3).Same precision notes with  . Z-IOEquivalent to  http://linux.die.net/man/2/linklink(2). Z-IOEquivalent to  "http://linux.die.net/man/2/symlink symlink(2).| Note On Windows the flags parameter can be specified to control how the symlink will be created.,: indicates that path points to a directory.<: request that the symlink is created using junction points.+On other platforms these flags are ignored. Z-IOEquivalent to  #http://linux.die.net/man/2/readlink readlink(2). Z-IOEquivalent to  #http://linux.die.net/man/3/realpath realpath(3) on Unix. Windows uses  https://msdn.microsoft.com/en-us/library/windows/desktop/aa364962(v=vs.85).aspxGetFinalPathNameByHandle.Warning This function has certain platform-specific caveats that were discovered when used in Node.macOS and other BSDs: this function will fail with UV_ELOOP if more than 32 symlinks are found while resolving the given path. This limit is hardcoded and cannot be sidestepped.Windows: while this function works in the common case, there are a number of corner cases where it doesn@t:Paths in ramdisk volumes created by tools which sidestep the Volume Manager (such as ImDisk) cannot be resolved.-Inconsistent casing when using drive letters.&Resolved path bypasses subst@d drives.While this function can still be used, it@s not recommended if scenarios such as the above need to be supported. The background story and some more details on these issues can be checked  *https://github.com/nodejs/node/issues/7726here.Note This function is not implemented on Windows XP and Windows Server 2003. On these systems, UV_ENOSYS is returned. Z-IOEquivalent to  http://linux.die.net/man/2/chownchown(2). Z-IOEquivalent to  !http://linux.die.net/man/2/fchown fchown(2). Z-IOEquivalent to  !http://linux.die.net/man/2/lchown lchown(2). Z-IOthe fileZ-IO closed flag Z-IOthe file we're readingZ-IOinitial offset Z-IObufferZ-IO buffer sizeZ-IO2file offset, pass -1 to use default(system) offsetZ-IO read length Z-IObufferZ-IO buffer sizeZ-IO2file offset, pass -1 to use default(system) offset Z-IOOpening flags, e.g.  .|. Z-IOSets the file mode (permission and sticky bits), but only if the file was created, see . Z-IO&directory where temp file are created.Z-IO A file path prefix template, no XXXXXX needed.Z-IOKeep file after used? Z-IOatime, i.e. access timeZ-IOmtime, i.e. modify time Z-IOatime, i.e. access timeZ-IOmtime, i.e. modify time     Composable IO Loops(c) Dong Han, 2017-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?q8 Z-IOType alias for  1 node which only takes input and perform effects.Note when implement a  , you should assume   argument is supplied only once(when upstream reaches EOF), you do not need to call downstream continuation before EOF, and do a flush(also write a final  ) when upstream reach EOF. Z-IOType alias for   node which never takes input.Note when implement a  , you should assume   argument is supplied only once, and you should loop to call downstream continuation with all available chunks, then write a final   to indicate EOF. Z-IOA  (blocked IO) node.A   node is a push based stream transformer. It can be used to describe different kinds of IO devices: BIO inp out describe an IO state machine(e.g. z_stream in zlib), which takes some input in block, then outputs.type Source out = BIO Void out described an IO source, which never takes input, but gives output until EOF by looping.type Sink inp = BIO inp Void described an IO sink, which takes input and perform some IO effects, such as writing to terminal or files.You can connect these   nodes with   which connect left node's output to right node's input, and return a new  ? node with left node's input type and right node's output type.You can run a   node in different ways: / 9 to supply a single chunk of input and step the BIO node. /  will supply EOF directly, which will effectively pull all values from source, and push to sink until source reaches EOF. /  will supply a single block of input as whole input and run the BIO node. /  will supply a list of blocks as whole input and run the BIO node.Note   usually contains some IO states, you can consider it as an opaque  :You shouldn't use a   node across multiple  % chain unless the state can be reset.You shouldn't use a  ? node across multiple threads unless document states otherwise.  is simply a convenient way to construct single-thread streaming computation, to use   in multiple threads, check Z.IO.BIO.Concurrent module. Z-IO.Patterns for more meaningful pattern matching. Z-IO Connect two  : source, after first reach EOF, draw elements from second. Z-IO Fuse two   sinks, i.e. everything written to the fused sink will be written to left and right sink. Flush result  " will effectively flush both sink. Z-IOFuse a list of   sinks, everything written to the fused sink will be written to every sink in the list. Flush result  / will effectively flush every sink in the list. Z-IOConnect list of  6 sources, after one reach EOF, draw element from next. Z-IOA  " directly write EOF to downstream. Z-IOConnect list of  6 sources, after one reach EOF, draw element from next. Z-IODiscards a value. Z-IO$Supply a single chunk of input to a   and collect result. Z-IO$Supply a single chunk of input to a   without collecting result. Z-IORun a   loop without providing input. When used on  ., it starts the streaming loop. When used on  , it performs a flush. Z-IORun a  2 loop without providing input, and collect result. When used on  #, it will collect all input chunks. Z-IO%Run a strict fold over a source with  . Z-IO%Run a strict fold over a source with  . Z-IORun a  ? loop with a single chunk of input and EOF, and collect result. Z-IORun a   loop with a single chunk of input and EOF, without collecting result. Z-IOWrap   into a pure interface.You can wrap a stateful BIO computation(including the creation of   node), when you can guarantee a computation is pure, e.g. compressing, decoding, etc. Z-IO$Supply blocks of input and EOF to a  , and collect results. Note many   node will be closed or not be able to take new input after drained. Z-IO$Supply blocks of input and EOF to a  , without collecting results. Note many   node will be closed or not be able to take new input after drained. Z-IOWrap   into a pure interface. Similar to  ", but with a list of input blocks. Z-IOSource a list(or any  ) from memory. Z-IOTurn a  into   source, map EOF to EOF. Z-IOTurn a   action into  Z-IOTurn a UTF8 encoded  into   source, map EOF to EOF. Z-IOTurn a JSON encoded  into   source, ignoring any whitespaces bewteen JSON objects. If EOF reached, then return   . Throw  with name EJSON* if JSON value is not parsed or converted. Z-IO7Turn buffered input device into a packet source, throw  with name EPARSE if parsing fail. Z-IO7Turn buffered input device into a packet source, throw  with name EPARSE if parsing fail. Z-IOTurn a file into a   source. Z-IOTurn a file into a   source with given chunk size. Z-IOTurn a  into a   sink. Z-IOTurn a  into a   sink. Z-IOTurn a file into a   sink. Note the file will be opened in  .|.  .|.  mode, bytes will be written after the end of the original file if there'are old bytes. Z-IOTurn an   action into   sink. Z-IOTurn an  " action(and a flush action), into   sink. Z-IOSink to a list in memory.The   will be empty during sinking, and will be filled after sink receives an EOF. Z-IOBIO node from a pure function.BIO node made with this funtion are stateless, thus can be reused across chains. Z-IOBIO node from an IO function.BIO node made with this funtion may not be stateless, it depends on if the IO function use IO state. Z-IOBIO node from a pure filter.BIO node made with this funtion are stateless, thus can be reused across chains. Z-IOBIO node from an impure filter.BIO node made with this funtion may not be stateless, it depends on if the IO function use Z-IOMake a chunk size divider.A divider size divide each chunk's size to the nearest multiplier to granularity, last trailing chunk is directly returned. Z-IORead buffer and parse with Parser.This function will turn a Parser into a  , throw  with name EPARSE if parsing fail. Z-IOMake a new UTF8 decoder, which decode bytes streams into text streams.#If there're invalid UTF8 bytes, an  with name  EINVALIDUTF8 will be thrown.`Note this node is supposed to be used with preprocess node such as decompressor, parser, etc. where bytes boundary cannot be controlled, UTF8 decoder will concat trailing bytes from last block to next one. Use this node directly with  + will not be as efficient as directly use   , because  provides push back capability, trailing bytes can be pushed back to reading buffer then returned with next block input together. Z-IO/Make a new stream splitter based on magic byte. Z-IO-Make a new stream splitter based on linefeed(rn or n).*The result bytes doesn't contain linefeed. Z-IOMake a new base64 encoder node. Z-IOMake a new base64 decoder node. Z-IOMake a hex encoder node.9Hex encoder is stateless, it can be reused across chains. Z-IOMake a new hex decoder node. Z-IO8Make a new BIO node which counts items flow throught it.  is increased atomically, it's safe to read / reset the counter from other threads. Z-IOMake a new BIO node which counts items, and label item with a sequence number.  is increased atomically, it's safe to read / reset the counter from other threads. Z-IO6Make a BIO node grouping items into fixed size arrays.%Trailing items are directly returned. Z-IOA BIO node flatten items. Z-IOA BIO node which write   to   when   is reached. Z-IOPass  % to indicate current node reaches EOFZ-IO  indicates upstream reaches EOF Z-IOchunk granularity Z-IO uppercase?6 6 The zlib binding(c) Dong Han, 2017-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?& Z-IO)Zlib exceptions, a sub exception type to . Z-IOA foreign pointer to a zlib's  z_stream_s struct. Z-IOThe   specifies how much memory should be allocated for the internal compression state. 1 uses minimum memory but is slow and reduces compression ratio; 9 uses maximum memory for optimal speed. The default value is 8. Z-IOThe   is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range 8..15 for this version of the library. The   value is 15. Decompressing windowBits must be greater than or equal to the compressing windowBits. If a compressed stream with a larger window size is given as input, decompress will throw  ZDataError windowBits can also be @8..@15 for raw inflate. In this case, -windowBits determines the window size. inflate() will then process raw deflate data, not looking for a zlib or gzip header, not generating a check value, and not looking for any check values for comparison at the end of the stream. windowBits can also be greater than 15 for optional gzip decoding. Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection, or add 16 to decode only the gzip format. Z-IOMake a new compress node. The returned  % node can be reused only if you call   on the  . Z-IO)Reset compressor's state so that related   can be reused. Z-IOCompress some bytes. Z-IOCompress some bytes in blocks. Z-IOMake a new decompress node. The returned  % node can be reused only if you call   on the  . Z-IO+Reset decompressor's state so that related   can be reused. Z-IODecompress some bytes. Z-IO Decompress some bytes in blocks.& &  Base64 codec(c) Dong Han, 2017-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?1 Z-IO.Zip two BIO node by running them concurrently.This implementation use  > to synchronize two BIO's output, which has some implications:.Two node should output same numebr of results.%If the number differs, one node maybe Z-IOMake an unbounded queue and a pair of sink and souce connected to it. Z-IOMake an bounded queue and a pair of sink and souce connected to it. Z-IOMake a broadcast chan and a sink connected to it, and a function return sources to receive broadcast message. Z-IOnumber of producers Z-IOnumber of producersZ-IOqueue buffer bound Z-IOnumber of producersZ-IO(Sink, IO Source)  $Composable IO Loops(c) Dong Han, 2017-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=? #cross-platform recursive fs watcher(c) Dong Han, 2017-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?m Z-IOFile event with path info. Z-IO%Watching a list of given directories. Z-IO;Start watching a list of given directories, stream version. Z-IODirectories to be watchedZ-IOrecursively watch?Z-IOCallback function to handle  Z-IO watching listZ-IOrecursively watch?  %FileSystem Umbrella module(c) Song Xue, Dong Han, 2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?[ High performance logger(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portableNone-  "%&(/015;<=?> Z-IOLogging Levels;We following the Python logging levels, for details, see: ;https://docs.python.org/3/howto/logging.html#logging-levelsLevel Numeric valueCRITICAL50FATAL40WARNING30INFO20DEBUG10NOTSET0 Z-IO'Logger config type used in this module. Z-IO%Minimal flush interval, see Notes on  Z-IO"Buffer size to build each log line Z-IOConfig log's filter level Z-IO Log formatter Z-IOThe   type. Z-IOFormatter used by  . Z-IOA default logger config with0.1s minimal flush intervalline buffer size 240 bytesshow everything by default Z-IOA default logger config with0.5s minimal flush intervalline buffer size 1000 bytesshow everything by default Z-IO&A default timestamp cache with format %Y-%m-%dT%H:%M:%S%Z().The timestamp will updated in 0.1s granularity to ensure a seconds level precision. Z-IO*Make a new logger with given write device. Z-IOMake a new logger write to . Z-IO"Make a new file based logger with  .'The file will be opened in append mode. Z-IOUse   and   to implement a simple   based concurrent logger. logsRef <- newIORef [] let push = pushLogIORef logsRef lineBufSize flush = flushLogIORef stderrBuf logsRef throttledFlush <- throttleTrailing_ flushInterval flush .. return $ Logger push flush throttledFlush ... Z-IOA default log formatter "[FATAL][2021-02-01T15:03:30+0800][ interactive:31:1][thread#669]... Z-IOA default colored log formatterDEBUG level is , WARNING level is , FATAL and CRITICAL level are . Z-IOA default JSON log formatter. {"level":"FATAL","time":"2021-02-01T15:02:19+0800","loc":":27:1","theadId":606,"content":"..."}\n Z-IODefault stack formatter which fetch the logging source and location. Z-IOChange the global logger. Z-IOGet the global logger.This is a logger connected to stderr, if stderr is connect to TTY, then use  , otherwise use  . Z-IOManually flush global logger. Z-IO'Flush global logger when program exits. Z-IOFormat   to  , etc.Level other than built-in ones, are formatted in decimal numeric format, i.e. defaultLevelFmt 60 == LEVEL60 Z-IOFor composing different loggers Z-IOlogging functionZ-IOmanually flush Z-IO"data/time string(second precision)Z-IO log levelZ-IO log contentZ-IOcall stack traceZ-IOlogging thread id Z-IO5logs stored in a list, new log will be CASed into it.Z-IObuffer size to build each logZ-IO formatted log Z-IO log levelZ-IOflush immediately?Z-IO log content Z-IO log levelZ-IOflush immediately?Z-IO log content( ( IO Umbrella module(c) Dong Han, 2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?  !"#$%&'()*+-,21436587=9:<;?>A@BCDHEGFIJKLMNOPQTSRUZWYXa\^_`[]bcVhijklmnopqrstuvwxyz{|}~ IO manager based on libuv(c) Dong Han, 2017-2018BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?k Z-IOA haskell data type wrap an  uv_stream_t inside # DO NOT provide thread safety! Use   concurrently in multiple threads will lead to undefined behavior. Z-IO?Safely lock an uv manager and perform uv_handle initialization.2Initialization an UV stream usually take two step:-allocate an uv_stream struct with proper sizelock a particular uv_loop from a uv manager, and perform custom initialization, such as  uv_tcp_init.And this is what   do, all you need to do is to provide the manager you want to hook the handle onto(usually the one on the same capability, i.e. the one obtained by ), and provide a custom initialization function (which should throw an exception if failed). Z-IOManually close a uv stream. Z-IOShutdown the outgoing (write) side of a duplex stream. It waits for pending write requests to complete.Futher writing will throw (EPIPE). Z-IO Get stream fd Z-IOWrite "hello world" to a  . Z-IOEcho whatever received bytes. TCP servers and clients(c) Dong Han, 2018BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=? Z-IOA TCP server configuration Z-IOlistening address Z-IO=listening socket's backlog size, should be large enough(>128) Z-IOif we want to use  TCP_NODELAY Z-IO+set keepalive delay for worker socket, see  Z-IOA TCP client configuration Z-IO*assign a local address, or let OS pick one Z-IOremote target address Z-IOif we want to use  TCP_NODELAY Z-IO+set keepalive delay for client socket, see  Z-IODefault config, connect to localhost:8888. Z-IOinit a TCP client %, which open a new connect when used. Z-IO,A default hello world server on 0.0.0.0:8888 Test it with =main = startTCPServer defaultTCPServerConfig helloWorldWorker or 7main = startTCPServer defaultTCPServerConfig echoWorker , now try nc -v 127.0.0.1 8888 Z-IOStart a TCP server.Fork new worker threads upon a new connection. Z-IO+Start a server loop with different kind of  uv_streams, such as tcp or pipe. Z-IOEnable or disable  TCP_NODELAY,, which enable or disable Nagle@s algorithm. Z-IOEnable / disable TCP keep-alive. delay is the initial delay in seconds, ignored when enable is zero.After delay has been reached, 10 successive probes, each spaced 1 second from the previous one, will still happen. If the connection is still lost at the end of this procedure, then the connection is closed, pending io thread will throw  exception. Z-IO5Get the current address to which the handle is bound. Z-IO4Get the address of the peer connected to the handle. Z-IOworker which will get an accepted TCP stream and run in a seperated haskell thread, will be closed upon exception or worker finishes. Z-IObackLogZ-IOuv_stream_t initializerZ-IO bind functionZ-IOthread spawnerZ-IOworker  *Named pipe/Unix domain servers and clients(c) Dong Han, 2018BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?2 Z-IOA IPC server configuration Z-IO*listening path (Unix) or a name (Windows). Z-IO;listening pipe's backlog size, should be large enough(>128) Z-IOA IPC client configuration Z-IObind to a local file path (Unix) or name (Windows), won't bind if set to  . Z-IO'target path (Unix) or a name (Windows). Z-IO#Default config, connect to "./ipc". Z-IOinit a IPC client %, which open a new connect when used. Z-IO A default hello world server on ./ipc Test it with ,main = startIPCServer defaultIPCServerConfig Z-IOStart a server-Fork new worker thread upon a new connection. Z-IOworker which get an accepted IPC stream, run in a seperated haskell thread, will be closed upon exception or worker finishes.  Process utilities(c) Dong Han, 2018-2020BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?ب Z-IO Process state Z-IODefault process options, start "./main"0 with no arguments, redirect all std streams to  /dev/null. Z-IO'Wait until process exit and return the 0. Z-IO Get process  if process is running. Z-IOSend signals to process. Z-IOResourced spawn processes.>Return a resource spawn processes, when initiated return the (stdin, stdout, stderr, pstate)+ tuple, std streams are created when pass  option, otherwise will be  , pstate will be updated to  & automatically when the process exits.When you finish using the process resource, a cleanup action will be called to wait process exit and close any std stream created during spawn. If you also need to kill the process, see   instead. initProcess defaultProcessOptions{ processFile="your program" , processStdStreams = (ProcessCreate, ProcessCreate, ProcessCreate) } $ (stdin, stdout, stderr, pstate) -> do ... -- read or write from child process's std stream, will clean up automatically waitProcessExit pstate -- wait for process exit on current thread. Z-IOResourced spawn processes. The same as  (, but the clean action will try to send   to the process first. Z-IO"Spawn a processe with given input.Child process's stdout and stderr output are collected, return with exit code. Z-IO/Spawn a processe with given UTF8 textual input.Child process's stdout and stderr output are collected as UTF8 bytes, return with exit code. Z-IOSpawn a new process.Please manually close child process's std stream(if any) after process exits. Z-IORetrieves the scheduling priority of the process specified by pid.The returned value of priority is between -20 (high priority) and 19 (low priority). On Windows, the returned priority will equal one of the PRIORITY constants. Z-IO=Sets the scheduling priority of the process specified by pid.The priority value range is between -20 (high priority) and 19 (low priority). The constants , , , , , and # are also provided for convenience. Z-IO%processStdStreams options are ignoredZ-IOstdinZ-IOstdout, stderr, exit code Z-IO%processStdStreams options are ignoredZ-IOstdinZ-IOstdout, stderr, exit code2 0./ 2   0./  &Special code on windows(c) Winterland, 2017-2018BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=? Z-IO  is necessary for some socket code because on windows WSAStartup has to be called before use sockets.This functions will run  uv__once_init once if not run before, DNS and reverse DNS(c) Winterland, 2018BSDwinterland1989@gmail.com experimental non-portable Safe-Inferred,  "%&(/015;<=?( Z-IO-Flags that control the querying behaviour of  . For more information, see +https://tools.ietf.org/html/rfc3493#page-30 Z-IOResolve a datagram-based service name. This is required only for the few protocols that have different port numbers for their datagram-based versions than for their stream-based versions. Z-IO;If the hostname cannot be looked up, an IO error is thrown. Z-IO>If a host is local, return only the hostname part of the FQDN. Z-IOThe name of the host is not looked up. Instead, a numeric representation of the host's address is returned. For an IPv4 address, this will be a dotted-quad string. For IPv6, it will be colon-separated hexadecimal. Z-IOThe name of the service is not looked up. Instead, a numeric representation of the service is returned. Z-IO Address info Z-IO-Flags that control the querying behaviour of  . For more information, see +https://tools.ietf.org/html/rfc3493#page-25 Z-IOThe list of returned   values will only contain IPv4 addresses if the local system has at least one IPv4 interface configured, and likewise for IPv6. (Only some platforms support this.) Z-IOIf   is specified, return all matching IPv6 and IPv4 addresses. Otherwise, this flag has no effect. (Only some platforms support this.) Z-IOThe   field of the first returned  / will contain the "canonical name" of the host. Z-IOThe   argument must be a numeric address in string form, and network name lookups will not be attempted. Z-IOThe   argument must be a port number in string form, and service name lookups will not be attempted. (Only some platforms support this.) Z-IOIf no  3 value is provided, the network address in each  will be left as a "wild card". This is useful for server applications that will accept connections from any client. Z-IOIf an IPv6 lookup is performed, and no IPv6 addresses are found, IPv6-mapped IPv4 addresses will be returned. (Only some platforms support this.) Z-IOEither a service name e.g., "http" or a numeric port number. Z-IOEither a host name e.g.,  "haskell.org" or a numeric host address string consisting of a dotted decimal IPv4 address or an IPv6 address e.g.,  "192.168.0.1". Z-IOIndicate whether the given  % will have any effect on this system. Z-IO&Default hints for address lookup with  .addrFlags defaultHints[]addrFamily defaultHints AF_UNSPECaddrSocketType defaultHints NoSocketTypeaddrProtocol defaultHints0 Z-IO>Resolve a host or service name to one or more addresses. The  + values that this function returns contain 1 values that you can use to init TCP connection.This function is protocol independent. It can return both IPv4 and IPv6 address information.The   argument specifies the preferred query behaviour, socket options, or protocol. You can override these conveniently using Haskell's record update syntax on  , for example as follows:let hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Stream }9You must provide non empty value for at least one of the   or   arguments.   can be either a numeric network address (dotted quad for IPv4, colon-separated hex for IPv6) or a hostname. In the latter case, its addresses will be looked up unless  3 is specified as a hint. If you do not provide a   value and do not set   as a hint, network addresses in the result will contain the address of the loopback interface.If the query fails, this function throws an IO exception instead of returning an empty list. Otherwise, it returns a non-empty list of   values.There are several reasons why a query might result in several values. For example, the queried-for host could be multihomed, or the service might be available via several protocols.Note: the order of arguments is slightly different to that defined for  getaddrinfo in RFC 2553. The  ; parameter comes first to make partial application easier.5addr:_ <- getAddrInfo (Just hints) "127.0.0.1" "http"addrAddress addr 127.0.0.1:80 Z-IOPeek addrinfo linked list. Z-IOResolve an address to a host or service name. This function is protocol independent. The list of  ! values controls query behaviour.If a host or service's name cannot be looked up, then the numeric form of the address or service will be returned.9If the query fails, this function throws an IO exception.?(>?(>@(>A(BC(BC(BD(BD(BE(BE(BF(BF(BG(BG(BH(BH(BI(BI(BJ(BJ(BK(BL(BM(BN(BO(BP(BQ(BR(BS(BT(BU(VW(2X(2X(2Y(2Z(2[(2\(2\(2](2](2^(2^(2_(2_(2`(2a(2b(2c(2d(2e(2e(2f(2f(2g(2h(2i(jk(jl(jm(jn(jo(jp(jq(jr(js(jt(ju(jv(j(wx(wy(wy(wz({|({}({~({({({({({({({({({(+({|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 #                                                                                                                                                                                                                                                                                                                                   !                                                                                                                                                                                      ( (  (  (   (  (  -  -. - -  -. -  -     (V ( (      (6   (    -      () (     (   -     !&     #Z-IO-2.0.0.0-51Vcxm8cL7LL2DAVynurM3Z.IO.Exception Z.IO.Buffered Z.IO.Resource Z.IO.ProcessZ.IO.StdStream Z.IO.Time Z.IO.UV.ErrnoZ.IO.Network.SocketAddr Z.IO.UV.FFIZ.IO.UV.FFI_EnvZ.IO.LowResTimerZ.IO.UV.ManagerZ.IO.StdStream.AnsiZ.IO.Network.UDPZ.IO.EnvironmentZ.IO.FileSystem.FilePathZ.IO.FileSystem.ThreadedZ.IO.FileSystem.Base Z.IO.BIO.Base Z.IO.BIO.ZlibZ.IO.BIO.ConcurrentZ.IO.FileSystem.Watch Z.IO.LoggerZ.IO.UV.UVStreamZ.IO.Network.TCPZ.IO.Network.IPCZ.IO.Network.DNSCcatchSystem.TimeouttimeoutZ.IOLoggerSystem.EnvironmentgetArgsZ.IO.BIOZ.IO.FileSystem Z.IO.UV.Win Z.IO.NetworkbaseGHC.BaseassertGHC.Stack.Types CallStack%Z-Data-2.0.0.1-D6bhnnwhef4JWGOmwvf1YvZ.Data.Vector.Base chunkOverheadsmallChunkSizedefaultChunkSizeGHC.IO.ExceptionArrayExceptionIndexOutOfBoundsUndefinedElementControl.Monad.IO.ClassliftIOGHC.Conc.SignalSignalControl.Concurrent.MVarwithMVar GHC.Stack callStackControl.ExceptionHandlercatchesallowInterruptControl.Exception.Base TypeError RecUpdError RecSelError RecConErrorPatternMatchFailNonTermination NoMethodErrorNestedAtomicallytryJusttry onException mapException handleJusthandlefinally catchJustbracket_bracketOnErrorbracket GHC.Conc.SyncthrowToSomeAsyncException ExitSuccess ExitFailureExitCodeDeadlockCompactionFailedBlockedIndefinitelyOnSTMBlockedIndefinitelyOnMVar UserInterrupt ThreadKilled StackOverflow HeapOverflowAsyncExceptionAssertionFailedAllocationLimitExceededioErrorasyncExceptionToExceptionasyncExceptionFromExceptionGHC.IOUnmaskedMaskedUninterruptibleMaskedInterruptible MaskingStateuninterruptibleMask_uninterruptibleMaskthrowIOmask_mask interruptiblegetMaskingStateevaluate GHC.ExceptionErrorCallWithLocation ErrorCallthrowGHC.Exception.Type SomeException toException fromExceptiondisplayException Exception UnderflowRatioZeroDenominatorOverflowLossOfPrecision DivideByZeroDenormalArithException HasCallStack time-1.11.1.1#Data.Time.Clock.Internal.SystemTime systemSecondssystemNanoseconds MkSystemTime SystemTime uv_err_name uv_strerror UV_EMLINKUV_ENXIOUV_EOF UV_UNKNOWNUV_EXDEV UV_ETXTBSY UV_ETIMEDOUTUV_ESRCH UV_ESPIPE UV_ESHUTDOWNUV_EROFS UV_ERANGE UV_EPROTOTYPEUV_EPROTONOSUPPORT UV_EPROTOUV_EPIPEUV_EPERM UV_ENOTSUP UV_ENOTSOCK UV_ENOTEMPTY UV_ENOTDIR UV_ENOTCONN UV_ENOSYS UV_ENOSPCUV_ENOPROTOOPT UV_ENONET UV_ENOMEM UV_ENOENT UV_ENODEV UV_ENOBUFS UV_ENFILEUV_ENETUNREACH UV_ENETDOWNUV_ENAMETOOLONG UV_EMSGSIZE UV_EMFILEUV_ELOOP UV_EISDIR UV_EISCONNUV_EIO UV_EINVALUV_EINTRUV_EHOSTUNREACHUV_EFBIG UV_EFAULT UV_EEXISTUV_EDESTADDRREQ UV_ECONNRESETUV_ECONNREFUSEDUV_ECONNABORTED UV_ECHARSET UV_ECANCELEDUV_EBUSYUV_EBADF UV_EALREADYUV_EAI_SOCKTYPEUV_EAI_SERVICEUV_EAI_PROTOCOLUV_EAI_OVERFLOW UV_EAI_NONAME UV_EAI_NODATA UV_EAI_MEMORY UV_EAI_FAMILY UV_EAI_FAILUV_EAI_CANCELEDUV_EAI_BADHINTSUV_EAI_BADFLAGS UV_EAI_AGAINUV_EAI_ADDRFAMILY UV_EAGAINUV_EAFNOSUPPORTUV_EADDRNOTAVAIL UV_EADDRINUSE UV_EACCESUV_E2BIG uvStdError uvErrNameIOEInfoioeNameioeDescription ioeCallStack InterruptedResourceVanished TimeExpiredUnsupportedOperation HardwareFaultInappropriateTypeInvalidArgument OtherError ProtocolError SystemErrorUnsatisfiedConstraintsPermissionDeniedIllegalOperation UnexpectedEOFResourceExhausted ResourceBusy NoSuchThing AlreadyExistsSomeIOExceptionioExceptionToExceptionioExceptionFromExceptionthrowOOMIfNullthrowUVIfMinusthrowUVIfMinus_ throwUVIf throwUVIf_ throwECLOSEDthrowECLOSEDSTMthrowOtherErrorunwrapunwrap' catchSync ignoreSyncthrowUV throwUVError$fExceptionSomeIOException$fShowSomeIOException$fPrintIOEInfo $fShowIOEInfo$fExceptionInterrupted$fExceptionResourceVanished$fExceptionTimeExpired$fExceptionUnsupportedOperation$fExceptionHardwareFault$fExceptionInappropriateType$fExceptionInvalidArgument$fExceptionOtherError$fExceptionProtocolError$fExceptionSystemError!$fExceptionUnsatisfiedConstraints$fExceptionPermissionDenied$fExceptionIllegalOperation$fExceptionUnexpectedEOF$fExceptionResourceExhausted$fExceptionResourceBusy$fExceptionNoSuchThing$fExceptionAlreadyExists$fShowAlreadyExists$fShowNoSuchThing$fShowResourceBusy$fShowResourceExhausted$fShowUnexpectedEOF$fShowIllegalOperation$fShowPermissionDenied$fShowUnsatisfiedConstraints$fShowSystemError$fShowProtocolError$fShowOtherError$fShowInvalidArgument$fShowInappropriateType$fShowHardwareFault$fShowUnsupportedOperation$fShowTimeExpired$fShowResourceVanished$fShowInterruptedProtocolNumber SocketType SocketFamily PortNumber Interface interfaceNameinterfacePhysAddrinterfaceIsInternal interfaceAddr interfaceMaskIPv6IPv4 getIPv4AddrScopeIDFlowInfo SocketAddrSocketAddrIPv4SocketAddrIPv6htonlntohlhtonsntohs IPPROTO_UDP IPPROTO_TCP IPPROTO_IPIPPROTO_DEFAULTSOCK_ANYSOCK_SEQPACKETSOCK_RDMSOCK_RAW SOCK_DGRAM SOCK_STREAMAF_INET6AF_INET AF_UNSPECsockAddrFamilyipv4ipv6ipv4Any ipv4Broadcastipv4None ipv4Loopbackipv4UnspecificGroupipv4AllHostsGroupipv4MaxLocalGroupipv4AddrToTupletupleToIPv4Addripv6Any ipv6Loopbackipv6AddrToTupletupleToIPv6AddrpeekSocketAddrpokeSocketAddrwithSocketAddrwithSocketAddrUnsafesizeOfSocketAddrwithSocketAddrStoragewithSocketAddrStorageUnsafesizeOfSocketAddrStoragepeekSocketAddrMBApokeSocketAddrMBA peekInterface getInterfaceportAnydefaultPortNumberHTTPdefaultPortNumberHTTPSdefaultPortNumberSMTPdefaultPortNumberPOP3defaultPortNumberIMAPdefaultPortNumberIRC$fUnalignedIPv4$fStorableIPv4 $fPrintIPv4 $fShowIPv4 $fJSONIPv4$fUnalignedIPv6$fStorableIPv6 $fPrintIPv6 $fShowIPv6 $fJSONIPv6$fUnalignedPortNumber$fStorablePortNumber$fPrintSocketAddr$fShowSocketAddr$fJSONSocketAddr$fShowInterface $fEqInterface$fOrdInterface$fGenericInterface$fPrintInterface$fJSONInterface$fEqSocketAddr$fOrdSocketAddr$fGenericSocketAddr$fEqPortNumber$fOrdPortNumber$fEnumPortNumber$fGenericPortNumber$fShowPortNumber$fPrintPortNumber$fReadPortNumber$fNumPortNumber$fBoundedPortNumber$fRealPortNumber$fIntegralPortNumber$fJSONPortNumber$fEqIPv6 $fOrdIPv6 $fGenericIPv6$fEqIPv4 $fOrdIPv4 $fGenericIPv4BufferedOutput bufOutput BufferedInputbufInputIODevOutput writeOutputInput readInputnewBufferedInputnewBufferedOutputnewBufferedOutput'newBufferedInput' newBufferedIOnewBufferedIO' readBufferreadBufferTextclearInputBuffer readExactlyreadAllreadAll' unReadBufferreadParseChunk readParser readToMagicreadLine writeBuffer writeBuffer' writeBuilder writeBuilder' flushBufferclearOutputBuffer UVHandleTypeProcessStdStream ProcessIgnore ProcessCreateProcessInheritProcessOptions processFile processArgs processEnv processCWD processFlags processUID processGIDprocessStdStreams ProcessFlagGIDUID SymlinkFlag AccessResult NoExistence NoPermissionAccessOK AccessMode CopyFileFlagFStatstDevstModestNlinkstUIDstGIDstRdevstInostSize stBlksizestBlocksstFlagsstGenstAtimstMtimstCtim stBirthtim UVTimeSpec uvtSecond uvtNanoSecond DirEntType DirEntUnknown DirEntFile DirEntDir DirEntLink DirEntFIFO DirEntSocket DirEntChar DirEntBlock UVDirEntTypeWhenceFileFlagFileModeTTYModeUDPFlag MembershipUVHandle UVRunMode UVLoopDataUVLoopFD UVSlotUnsafe unsafeGetSlotUVSloths_uv_fs_event_check_startuv_fs_event_stophs_uv_fs_event_startuv_fs_event_inituv_guess_handleuv_kill hs_uv_spawnhs_uv_fs_lchown_threadedhs_uv_fs_lchownhs_uv_fs_fchown_threadedhs_uv_fs_fchownhs_uv_fs_chown_threadedhs_uv_fs_chownhs_uv_fs_realpath_threadedhs_uv_fs_readlink_threadedhs_uv_fs_readlink_extra_cleanuphs_uv_fs_realpathhs_uv_fs_readlinkhs_uv_fs_readlink_cleanuphs_uv_fs_symlink_threadedhs_uv_fs_symlinkhs_uv_fs_link_threaded hs_uv_fs_linkhs_uv_fs_lutime_threadedhs_uv_fs_lutimehs_uv_fs_futime_threadedhs_uv_fs_futimehs_uv_fs_utime_threadedhs_uv_fs_utimehs_uv_fs_fchmod_threadedhs_uv_fs_fchmodhs_uv_fs_chmod_threadedhs_uv_fs_chmodhs_uv_fs_access_threadedhs_uv_fs_accesshs_uv_fs_copyfile_threadedhs_uv_fs_copyfilehs_uv_fs_ftruncate_threadedhs_uv_fs_fdatasync_threadedhs_uv_fs_fsync_threadedhs_uv_fs_rename_threadedhs_uv_fs_lstat_threadedhs_uv_fs_fstat_threadedhs_uv_fs_stat_threadedhs_uv_fs_ftruncatehs_uv_fs_fdatasynchs_uv_fs_fsynchs_uv_fs_renamehs_uv_fs_lstaths_uv_fs_fstat hs_uv_fs_staths_uv_fs_scandir_threadedhs_uv_fs_scandir_extra_cleanuphs_uv_fs_scandirhs_uv_fs_scandir_cleanuphs_seekhs_uv_fs_mkstemp_threadedhs_uv_fs_mkdtemp_threadedhs_uv_fs_rmdir_threadedhs_uv_fs_mkdir_threadedhs_uv_fs_unlink_threadedhs_uv_fs_write_threadedhs_uv_fs_read_threadedhs_uv_fs_close_threadedhs_uv_fs_open_threadedhs_uv_fs_mkstemphs_uv_fs_mkdtemphs_uv_fs_rmdirhs_uv_fs_mkdirhs_uv_fs_unlinkhs_uv_fs_write hs_uv_fs_readhs_uv_fs_close hs_uv_fs_openuv_tty_get_winsizeuv_tty_set_mode uv_tty_inituv_udp_getpeernameuv_udp_getsocknamehs_uv_udp_send_connectedhs_uv_udp_sendhs_uv_udp_check_startuv_udp_recv_stophs_uv_udp_recv_startuv_udp_set_ttluv_udp_set_broadcastuv_udp_set_multicast_interfaceuv_udp_set_multicast_ttluv_udp_set_multicast_loopuv_udp_set_source_membershipuv_udp_set_membershipuv_udp_disconnectuv_udp_connect uv_udp_bind uv_udp_openuv_udp_init_ex uv_udp_iniths_uv_pipe_connect uv_pipe_bind uv_pipe_init uv_pipe_openhs_set_socket_reusehs_uv_tcp_connect uv_tcp_binduv_tcp_getpeernameuv_tcp_getsocknameuv_tcp_keepaliveuv_tcp_nodelayuv_tcp_init_ex uv_tcp_init uv_tcp_openhs_uv_accept_check_starths_uv_shutdownhs_uv_try_write hs_uv_write uv_read_stophs_uv_read_starths_uv_listen_resume hs_uv_listenhs_uv_check_closehs_uv_check_iniths_uv_check_alloc hs_uv_canceluv_unrefhs_uv_handle_closehs_uv_handle_freehs_uv_handle_alloc hs_uv_filenohs_uv_wake_up_asynchs_uv_wake_up_timer uv_loop_alive uv_run_safeuv_runhs_uv_loop_closehs_uv_loop_inituv_version_string uv_versionUV_FS_EVENT_RECURSIVE UV_CHANGE UV_RENAMEUV_FILE UV_SIGNALUV_UDPUV_TTYUV_TIMERUV_TCP UV_STREAM UV_PROCESS UV_PREPAREUV_POLL UV_NAMED_PIPEUV_IDLE UV_HANDLE UV_FS_POLL UV_FS_EVENTUV_CHECKUV_ASYNCUV_UNKNOWN_HANDLEPROCESS_WINDOWS_HIDE_GUIPROCESS_WINDOWS_HIDE_CONSOLEPROCESS_WINDOWS_HIDEPROCESS_DETACHED"PROCESS_WINDOWS_VERBATIM_ARGUMENTSPROCESS_SETGIDPROCESS_SETUIDSYMLINK_JUNCTION SYMLINK_DIRSYMLINK_DEFAULTX_OKW_OKR_OKF_OKCOPYFILE_FICLONE_FORCECOPYFILE_FICLONE COPYFILE_EXCLCOPYFILE_DEFAULTSEEK_ENDSEEK_CURSEEK_SETO_WRONLYO_TRUNC O_TEMPORARYO_SYNC O_SYMLINK O_SHORT_LIVED O_SEQUENTIALO_RDWRO_RDONLYO_RANDOM O_NONBLOCK O_NOFOLLOWO_NOCTTY O_NOATIMEO_EXLOCKO_EXCLO_DSYNC O_DIRECTORYO_DIRECTO_CREATO_APPENDS_IFREGS_IFDIRS_IFLNKS_IFMTDEFAULT_DIR_MODEDEFAULT_FILE_MODES_IXOTHS_IWOTHS_IROTHS_IRWXOS_IXGRPS_IWGRPS_IRGRPS_IRWXGS_IXUSRS_IWUSRS_IRUSRS_IRWXU TTY_MODE_IO TTY_MODE_RAWTTY_MODE_NORMALUV_UDP_PARTIAL UDP_REUSEADDR UDP_IPV6ONLY UDP_DEFAULT JOIN_GROUP LEAVE_GROUP UV_RUN_NOWAIT UV_RUN_ONCEUV_RUN_DEFAULTINIT_LOOP_SIZESO_REUSEPORT_LOAD_BALANCEpeekUVEventQueueclearUVEventCounterpeekUVBufferTablepeekUVLoopDatapeekUVHandleDatauV_TCP_IPV6ONLYfromUVDirEntType peekUVDirEnt uvStatSize peekUVStatprocessStdStreamFlag$fStorableUVTimeSpec$fEqProcessOptions$fOrdProcessOptions$fShowProcessOptions$fReadProcessOptions$fGenericProcessOptions$fPrintProcessOptions$fJSONProcessOptions$fEqProcessStdStream$fOrdProcessStdStream$fShowProcessStdStream$fReadProcessStdStream$fGenericProcessStdStream$fPrintProcessStdStream$fJSONProcessStdStream $fShowFStat $fReadFStat $fEqFStat $fOrdFStat$fGenericFStat $fPrintFStat $fJSONFStat$fEqGID$fOrdGID $fShowGID $fReadGID $fGenericGID $fStorableGID $fPrimGID$fUnalignedGID$fNumGID $fJSONGID $fPrintGID$fEqUID$fOrdUID $fShowUID $fReadUID $fGenericUID $fStorableUID $fPrimUID$fUnalignedUID$fNumUID $fJSONUID $fPrintUID$fShowAccessResult$fEqAccessResult$fOrdAccessResult$fEnumAccessResult$fGenericAccessResult$fPrintAccessResult$fJSONAccessResult$fShowUVTimeSpec$fReadUVTimeSpec$fEqUVTimeSpec$fOrdUVTimeSpec$fGenericUVTimeSpec$fPrintUVTimeSpec$fJSONUVTimeSpec$fReadDirEntType$fShowDirEntType$fEqDirEntType$fOrdDirEntType$fEnumDirEntType$fGenericDirEntType$fPrintDirEntType$fJSONDirEntType TimeVal64tv64_sec tv64_usecCPUInfo cpu_model cpu_speedcpu_times_usercpu_times_nice cpu_times_syscpu_times_idle cpu_times_irqPassWDpasswd_username passwd_uid passwd_gid passwd_shellpasswd_homedirOSName os_sysname os_release os_version os_machinePriorityPIDResUsageru_utimeru_stime ru_maxrssru_ixrssru_idrssru_isrss ru_minflt ru_majfltru_nswap ru_inblock ru_oublock ru_msgsnd ru_msgrcv ru_nsignalsru_nvcsw ru_nivcswTimeValtv_sectv_usecuv_gettimeofday uv_loadavguv_free_cpu_info uv_cpu_info uv_os_tmpdir uv_os_homediruv_chdiruv_cwduv_os_free_passwduv_os_get_passwdhs_uv_random_threaded hs_uv_random uv_os_unameuv_os_gethostnameuv_os_unsetenv uv_os_setenv uv_os_getenvuv_os_free_environ uv_os_environ uv_hrtimeuv_os_setpriorityuv_os_getpriority uv_os_getppid uv_os_getpiduv_get_constrained_memoryuv_get_total_memoryuv_get_free_memory uv_getrusage uv_uptimeuv_resident_set_memoryUV_MAXHOSTNAMESIZEPRIORITY_HIGHEST PRIORITY_HIGHPRIORITY_ABOVE_NORMALPRIORITY_NORMALPRIORITY_BELOW_NORMAL PRIORITY_LOWsizeOfResUsage peekResUsage getOSName getPassWD getCPUInfopeekCPUInfoOff getLoadAvg getTimeOfDay$fShowTimeVal64$fReadTimeVal64 $fEqTimeVal64$fOrdTimeVal64$fGenericTimeVal64$fPrintTimeVal64$fJSONTimeVal64 $fEqCPUInfo $fOrdCPUInfo $fShowCPUInfo $fReadCPUInfo$fGenericCPUInfo$fPrintCPUInfo $fJSONCPUInfo $fEqPassWD $fOrdPassWD $fShowPassWD $fReadPassWD$fGenericPassWD $fPrintPassWD $fJSONPassWD $fEqOSName $fOrdOSName $fShowOSName $fReadOSName$fGenericOSName $fPrintOSName $fJSONOSName$fEqPID$fOrdPID $fShowPID $fReadPID $fGenericPID $fStorablePID $fPrimPID$fUnalignedPID $fJSONPID $fPrintPID$fShowResUsage$fReadResUsage $fEqResUsage $fOrdResUsage$fGenericResUsage$fPrintResUsage$fJSONResUsage $fShowTimeVal $fReadTimeVal $fEqTimeVal $fOrdTimeVal$fGenericTimeVal$fPrintTimeVal $fJSONTimeVal TimeFormatgetSystemTime'simpleDateFormatiso8061DateFormat webDateFormatmailDateFormatformatSystemTimeformatSystemTimeGMTparseSystemTimeparseSystemTimeGMT LowResTimerLowResTimerManager%lowResTimerManagerCapabilitiesChangedgetLowResTimerManagerisLowResTimerManagerRunningregisterLowResTimerregisterLowResTimer_registerLowResTimerOnqueryLowResTimercancelLowResTimercancelLowResTimer_ timeoutLowRestimeoutLowResExthreadDelayLowResthrottle throttle_throttleTrailing_$fExceptionTimeOutException$fShowTimeOutException SimplePoolPoolResourceacquire initResource initResource_ withResource withResource'statPoolinitPoolwithPoolinitSimplePoolwithSimplePool$fMonadIOResource$fMonadResource$fApplicativeResource$fFunctorResource UVManager uvmBlockTableuvmLoop uvmLoopData uvmRunninguvmCap getUVManager getBlockMVarpokeBufferTablepeekBufferSizeTablepokeBufferSizeTable withUVManagerwithUVManager' getUVSlot withUVRequestwithUVRequest_withUVRequest'withUVRequestExforkBa$fPrintUVManager$fShowUVManager StdStreamisStdStreamTTYgetStdStreamFDstdinstdoutstderrstdinBuf stdoutBuf stderrBufsetStdinTTYMode withRawStdingetStdoutWinSizeprintStdputStd printStdLn printStdLnPputStdLnreadStd$fOutputStdStream$fInputStdStream$fPrintStdStream$fShowStdStreamRGBColor PaletteColor AnsiColorBlackRedGreenYellowBlueMagentaCyanWhitecsicursorUp cursorDown cursorForwardcursorBackwardcursorDownLine cursorUpLinegetCursorPositionsetCursorColumnsetCursorPosition saveCursor restoreCursorclearFromCursorToScreenEnd clearFromCursorToScreenBeginning clearScreenclearFromCursorToLineEndclearFromCursorToLineBeginning clearLine scrollPageUpscrollPageDown hideCursor showCursorsetTitlesgrreset boldIntensityfaintIntensityresetIntensitybold italicized noItalicized italicizesingleUnderlinedoubleUnderline noUnderline underline slowBlink rapidBlinkblinkOffconcealrevealinvert invertOffcolorcolor'palettepalette'rgbrgb' setForegroundsetBrightForeground setBackgroundsetBrightBackgroundsetPaletteForegroundsetPaletteBackgroundsetRGBForegroundsetRGBBackgroundsetDefaultForegroundsetDefaultBackground colorToCode $fEqAnsiColor$fOrdAnsiColor$fBoundedAnsiColor$fEnumAnsiColor$fShowAnsiColor$fReadAnsiColor$fGenericAnsiColor$fPrintAnsiColor UDPRecvConfig recvMsgSize recvBatchSize ConnectedUDP UDPConfigudpSendMsgSize udpLocalAddrUDPdefaultUDPConfiginitUDP getSockName connectUDP disconnectUDP getPeerNamesendConnectedUDPsendUDPsetMulticastLoopsetMulticastTTLsetMulticastInterface setBroadcastsetTTL setMembershipsetSourceMembershipdefaultUDPRecvConfig recvUDPLooprecvUDP $fPrintUDP $fShowUDP$fPrintConnectedUDP$fShowConnectedUDP$fEqUDPRecvConfig$fOrdUDPRecvConfig$fShowUDPRecvConfig$fReadUDPRecvConfig$fGenericUDPRecvConfig$fPrintUDPRecvConfig$fJSONUDPRecvConfig $fEqUDPConfig$fOrdUDPConfig$fShowUDPConfig$fGenericUDPConfig$fPrintUDPConfig$fJSONUDPConfig getAllEnvgetEnvgetEnv'setEnvunsetEnvgetResidentSetMemory getUpTimegetHighResolutionTime getResUsagegetPIDgetPPID getHostname getRandom getRandomTgetCWDchDir getHomeDir getTempDir getFreeMem getTotalMemgetConstrainedMem PathStyle WindowsStyle UnixStyle pathStyle getPathStyle setPathStyle pathSeparatorpathSeparatorsisPathSeparatorsearchPathSeparatorisSearchPathSeparatorextensionSeparatorisExtensionSeparator splitBaseNamechangeBaseName splitRoot changeRoot splitSegments isAbsolute isRelativejoinconcat normalize intersectionabsoluterelativesplitExtension dropExtension takeExtension hasExtensionchangeExtension getSearchPath$fShowPathStyle $fEqPathStyle$fOrdPathStyle$fGenericPathStyle$fPrintPathStyle$fJSONPathStyleFileFilePtr newFilePtrgetFilePtrOffsetsetFilePtrOffsetreadFile readTextFile writeFile writeTextFile readJSONFile writeJSONFilescandirRecursively doesPathExist doesFileExist doesDirExistisLinkisDirisFileisLinkStisDirStisFileSt initTempFile initTempDir getFileFDseek readFileP writeFilePinitFilemkdirmkdirpunlinkmkdtempmkstemprmdirrmrfscandirstatlstatstat'lstat'fstatrenamefsync fdatasync ftruncatecopyfileaccesschmodfchmodutimefutimelutimelinksymlinkreadlinkrealpathchownfchownlchown $fOutputFile $fInputFile $fPrintFile $fShowFile$fOutputFilePtr$fInputFilePtrSinkSourceBIOEOF appendSourcejoinSinkfuseSink concatSource concatSource'discardstepstep_run_runfold'foldIO'runBlock runBlock_unsafeRunBlock runBlocks runBlocks_unsafeRunBlockssourceFromListsourceFromBuffered sourceFromIOsourceTextFromBufferedsourceJSONFromBufferedsourceParserFromBufferedsourceParseChunkFromBufferedinitSourceFromFileinitSourceFromFile'sinkToBufferedsinkBuilderToBufferedinitSinkToFilesinkToIO sinkToListfromPurefromIOfilterfilterIO newReChunk newParsernewUTF8DecodernewMagicSplitternewLineSplitternewBase64EncodernewBase64Decoder hexEncode newHexDecodercounterseqNum newGrouping ungroupingconsumedDecompressConfigdecompressWindowBitsdecompressDictionarydecompressBufferSizeZStreamCompressConfig compressLevelcompressWindowBitscompressMemoryLevelcompressDictionarycompressStrategycompressBufferSizeMemLevel WindowBits CompressLevelStrategyZ_DEFAULT_COMPRESSIONZ_BEST_COMPRESSION Z_BEST_SPEEDZ_DEFAULT_STRATEGYZ_FIXEDZ_RLEZ_HUFFMAN_ONLY Z_FILTEREDdefaultWindowBitsdefaultMemLeveldefaultCompressConfig newCompress compressResetcompresscompressBlocksdefaultDecompressConfig newDecompressdecompressReset decompressdecompressBlocks$fExceptionZlibException$fShowZlibException$fShowDecompressConfig$fEqDecompressConfig$fOrdDecompressConfig$fGenericDecompressConfig$fPrintDecompressConfig$fJSONDecompressConfig $fEqZStream $fOrdZStream $fShowZStream$fPrintZStream$fShowCompressConfig$fEqCompressConfig$fOrdCompressConfig$fGenericCompressConfig$fPrintCompressConfig$fJSONCompressConfigzip newTQueuePairnewTBQueuePairnewBroadcastTChanPair FileEventFileAdd FileRemove FileModify watchDirs initWatchDirs$fShowFileEvent$fReadFileEvent$fOrdFileEvent $fEqFileEvent$fGenericFileEvent$fPrintFileEvent$fJSONFileEventLevel LoggerConfigloggerMinFlushIntervalloggerLineBufSize loggerLevelloggerFormatter LogFormatterNOTSETDEBUGINFOWARNINGFATALCRITICALdefaultLoggerConfigdefaultJSONLoggerConfig newLogger newStdLogger newFileLogger defaultFmtdefaultColoredFmtdefaultJSONFmtdefaultFmtCallStacksetDefaultLoggergetDefaultLoggerflushDefaultLoggerwithDefaultLoggerdefaultLevelFmtdebuginfowarningfatalcritical otherLeveldebugToinfoTo warningTofatalTo otherLevelTo$fSemigroupLoggerUVStream uvsHandleuvsSlot uvsManager uvsClosed initUVStream closeUVStreamshutdownUVStream getUVStreamFD helloWorldecho$fOutputUVStream$fInputUVStream$fPrintUVStream$fShowUVStreamTCPServerConfig tcpListenAddrtcpListenBacklogtcpServerWorkerNoDelaytcpServerWorkerKeepAliveTCPClientConfig tcpClientAddr tcpRemoteAddrtcpClientNoDelaytcpClientKeepAlivedefaultTCPClientConfig initTCPClientdefaultTCPServerConfigstartTCPServerstartServerLoop initTCPStream setTCPNoDelaysetTCPKeepAlivegetTCPSockNamegetTCPPeerName$fEqTCPServerConfig$fOrdTCPServerConfig$fShowTCPServerConfig$fGenericTCPServerConfig$fPrintTCPServerConfig$fJSONTCPServerConfig$fEqTCPClientConfig$fOrdTCPClientConfig$fShowTCPClientConfig$fGenericTCPClientConfig$fPrintTCPClientConfig$fJSONTCPClientConfigIPCServerConfig ipcListenNameipcListenBacklogIPCClientConfig ipcClientName ipcTargetNamedefaultIPCClientConfig initIPCClientdefaultIPCServerConfigstartIPCServer initIPCStream$fEqIPCServerConfig$fOrdIPCServerConfig$fShowIPCServerConfig$fReadIPCServerConfig$fGenericIPCServerConfig$fPrintIPCServerConfig$fJSONIPCServerConfig$fEqIPCClientConfig$fOrdIPCClientConfig$fShowIPCClientConfig$fReadIPCClientConfig$fGenericIPCClientConfig$fPrintIPCClientConfig$fJSONIPCClientConfig ProcessStateProcessRunning ProcessExitedSIGHUPSIGKILLSIGINTSIGTERMdefaultProcessOptionswaitProcessExit getProcessPIDkillPID initProcess initProcess' readProcessreadProcessTextspawn getPriority setPriority$fShowProcessState$fEqProcessState$fOrdProcessState$fGenericProcessState$fPrintProcessState$fJSONProcessState NameInfoFlagNI_DGRAM NI_NAMEREQD NI_NOFQDNNI_NUMERICHOSTNI_NUMERICSERVAddrInfo addrFlags addrFamilyaddrSocketType addrProtocol addrAddress addrCanonName AddrInfoFlag AI_ADDRCONFIGAI_ALL AI_CANONNAMEAI_NUMERICHOSTAI_NUMERICSERV AI_PASSIVE AI_V4MAPPED ServiceNameHostNameaddrInfoFlagMappingaddrInfoFlagImplementednameInfoFlagMapping defaultHints getAddrInfofollowAddrInfo getNameInfo$fStorableAddrInfo$fEqNameInfoFlag$fReadNameInfoFlag$fShowNameInfoFlag $fEqAddrInfo $fOrdAddrInfo$fShowAddrInfo$fGenericAddrInfo$fPrintAddrInfo$fJSONAddrInfo$fEqAddrInfoFlag$fOrdAddrInfoFlag$fReadAddrInfoFlag$fShowAddrInfoFlag$fGenericAddrInfoFlag$fPrintAddrInfoFlag$fJSONAddrInfoFlagGHC.PtrnullPtr Data.EitherRight GHC.MaybeJustNothingisSyncExceptionGHC.WordWord16Word8Z.Data.Text.BaseTextemptyZ.Data.Parser.Base parseChunkParserBytesZ.Data.Builder.BaseBuilder Z.Data.CBytesCBytesformatSystemTimeHelperTimeOutException TimerListsetNumCapabilities Data.Functorvoid GHC.Conc.IO threadDelayensureLowResTimerManagerstartLowResTimerManagerfireLowResTimerQueue _poolResource_poolLimitPerKey _poolIdleTimeEntryghc-prim GHC.TypesIOMonadIOTrueFalseGHC.MVarMVarstartUVManager cancelUVReqStdFileBoolcheckFileClosedDouble. GHC.IORefIORef emptySource#foldl-1.4.13-LuHU1F26MecHtwj001mcXJ Control.FoldlFoldFoldM Data.FoldableFoldable sinkToIO'Z.Data.PrimRefCounter ZlibExceptiondefaultTSCache pushLogIORef withUVInitDopackBits unpackBitshs_getnameinfohs_getaddrinfo