This module contains all system related functions and environment variables manipulation.
A group identifier, represented by a numeric ID in UNIX systems (e.g. 1000).
- toNat : Nat
The numeric group ID.
Instances For
Equations
Equations
Equations
- Std.Async.System.instOrdGroupId.ord { toNat := a } { toNat := b } = (compare a b).then Ordering.eq
Instances For
Equations
- Std.Async.System.instReprGroupId = { reprPrec := fun (g : Std.Async.System.GroupId) => Repr.addAppParen (Std.Format.text "GroupId.mk " ++ repr g.toNat) }
A user identifier, represented by a numeric ID in UNIX systems (e.g. 1001).
- toNat : Nat
The numeric user ID.
Instances For
Equations
Equations
- Std.Async.System.instOrdUserId.ord { toNat := a } { toNat := b } = (compare a b).then Ordering.eq
Instances For
Equations
Equations
- Std.Async.System.instReprUserId = { reprPrec := fun (u : Std.Async.System.UserId) => Repr.addAppParen (Std.Format.text "UserId.mk " ++ repr u.toNat) }
Information about the current user.
- username : String
The user's name.
The user's ID.
The group the user belongs to.
The user's login shell.
- homeDir : Option System.FilePath
The home directory of the user.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Represents the breakdown of CPU time usage in milliseconds.
- userTime : Time.Millisecond.Offset
Time spent in user mode.
- niceTime : Time.Millisecond.Offset
Time spent on low-priority user processes.
- systemTime : Time.Millisecond.Offset
time spent in kernel mode.
- idleTime : Time.Millisecond.Offset
Time the CPU was idle.
- interruptTime : Time.Millisecond.Offset
Time spent servicing hardware interrupts.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Gets information about the operating system.
Equations
- Std.Async.System.getSystemInfo = do let uname ← Std.Internal.UV.System.osUname pure { name := uname.sysname, release := uname.release, version := uname.version, machine := uname.machine }
Instances For
Gets information about the CPU cores.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Gets the system uptime in seconds.
Equations
- Std.Async.System.getUpTime = do let __do_lift ← Std.Internal.UV.System.uptime pure (Std.Time.Second.Offset.ofNat __do_lift.toNat)
Instances For
The current high-resolution timestamp in nanoseconds. It is relative to an arbitrary time in the past.
Equations
- Std.Async.System.getHighResolutionTime = do let __do_lift ← Std.Internal.UV.System.hrtime pure (Std.Time.Nanosecond.Offset.ofNat __do_lift.toNat)
Instances For
Gets the hostname of the machine.
Instances For
Sets an environment variable to value.
Equations
- Std.Async.System.setEnvVar name value = Std.Internal.UV.System.osSetenv name value
Instances For
Gets an environment variable.
Equations
Instances For
Unset an environment variable.
Equations
Instances For
Gets all environment variables.
Equations
- Std.Async.System.getEnv = do let array ← Std.Internal.UV.System.osEnviron pure { toHashMap := (Std.HashMap.emptyWithCapacity array.size).insertMany array }
Instances For
Gets the current user's home directory.
Instances For
Gets the temporary directory.
Instances For
Gets the group by its ID, or none if there is no such group. Throws an IO.Error.invalidArgument
for an ID that does not fit the operating system's group ID type, and an
IO.Error.unsupportedOperation on Windows.
Equations
- One or more equations did not get rendered due to their size.