hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 67ef7d2af7a3023cc011e08fa5746807fdada349
parent f70dfa471cd3c2529e3b20bb7bb01e185c092837
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat, 28 Oct 2023 02:34:29 -0400

all: add trailing :: to module references in docs

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mcrypto/README | 4++--
Mcrypto/aes/README | 8++++----
Mcrypto/aes/xts/README | 2+-
Mcrypto/argon2/README | 4++--
Mcrypto/authenc.ha | 4++--
Mcrypto/bcrypt/README | 2+-
Mcrypto/bigint/README | 2+-
Mcrypto/blake2b/README | 2+-
Mcrypto/blowfish/README | 9+++++----
Mcrypto/chacha/README | 2+-
Mcrypto/chachapoly/README | 2+-
Mcrypto/cipher/README | 4++--
Mcrypto/curve25519/README | 2+-
Mcrypto/ed25519/README | 2+-
Mcrypto/ed25519/ed25519.ha | 2+-
Mcrypto/hmac/README | 2+-
Mcrypto/keyderiv.ha | 2+-
Mcrypto/keystore/README | 2+-
Mcrypto/math/README | 2+-
Mcrypto/poly1305/README | 2+-
Mcrypto/random/README | 2+-
Mcrypto/rsa/README | 2+-
Mcrypto/salsa/README | 2+-
Mcrypto/sha1/sha1.ha | 4++--
Mcrypto/x25519/README | 2+-
Mcrypto/x25519/x25519.ha | 2+-
Mfs/README | 2+-
Mhare/README | 9---------
Mhare/parse/README | 2+-
Mhare/types/README | 2+-
Mio/README | 8++++----
Mmath/random/README | 2+-
Mmemio/README | 4++--
Mnet/README | 5+++--
Mnet/dns/error.ha | 2+-
Mnet/unix/README | 2+-
Mos/README | 4++--
Mpath/README | 2+-
Mstrings/template/README | 2+-
Mtime/README | 4++--
Mtime/chrono/README | 2+-
Mtime/chrono/error.ha | 2+-
Mtime/date/README | 4++--
Mtypes/README | 2+-
Mtypes/c/README | 5+++--
Munix/+freebsd/groups.ha | 2+-
Munix/+freebsd/setuid.ha | 24++++++++++++------------
Munix/+linux/groups.ha | 2+-
Munix/+linux/setuid.ha | 24++++++++++++------------
49 files changed, 93 insertions(+), 99 deletions(-)

diff --git a/crypto/README b/crypto/README @@ -22,7 +22,7 @@ https://www.crypto101.io There are a few additional modules and functions which are of interest to users of the crypto module. Access to secure random data is provided by the -[[crypto::random]] module. The ability to securely erase sensitive data in RAM +[[crypto::random::]] module. The ability to securely erase sensitive data in RAM is provided by [[bytes::zero]]. Note also that [[bytes::equal]] is not suitable for constant-time comparisons; equality comparisons in a cryptographic context should utilize [[compare]] instead. @@ -46,4 +46,4 @@ The following features are offered in this module: - [[sign]] and [[verify]] provide public key message signing and verification. - [[exchange]] provides a secure key exchange function. - [[derivekey]] implements key derivation, which is also recommended for hashing passwords. -- [[hash]] provides a [[hash::hash]] algorithm suitable for cryptographic use. +- [[hash::]] provides a [[hash::hash]] algorithm suitable for cryptographic use. diff --git a/crypto/aes/README b/crypto/aes/README @@ -3,14 +3,14 @@ Standard per the [[crypto::cipher::block]] interface. Several implementations of AES are provided which are optimized for different scenarios. To choose the most appropriate one for your system, use [[aes]]. -When combined with a block cipher mode from [[crypto::cipher]], suitable buffer -lengths for static allocation are provided as constants such as [[BLOCKSZ]], -[[CTR_BUFSZ]], and [[CBC_BUFSZ]]. +When combined with a block cipher mode from [[crypto::cipher::]], suitable +buffer lengths for static allocation are provided as constants such as +[[BLOCKSZ]], [[CTR_BUFSZ]], and [[CBC_BUFSZ]]. This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/aes/xts/README b/crypto/aes/xts/README @@ -21,6 +21,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/argon2/README b/crypto/argon2/README @@ -12,7 +12,7 @@ configuration for details. Once a suitable configuration has been selected, the user must provide a salt. This salt should be stored alongside the hash, should be unique for each -password, and should be random: see [[crypto::random]]. The salt and hash +password, and should be random: see [[crypto::random::]]. The salt and hash lengths are configurable, the recommended defaults are 16 and 32 bytes respectively. @@ -25,6 +25,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/authenc.ha b/crypto/authenc.ha @@ -32,7 +32,7 @@ export type box = (mac, nonce, []u8); // // You must also establish a unique nonce for each message, which you must not // reuse for any future messages using the same session key. It is recommended -// to generate this randomly with [[crypto::random]]. +// to generate this randomly with [[crypto::random::]]. // // The plaintext parameter provides the message to encrypt. It will be // overwritten with the ciphertext. The buffer provided in the return value is @@ -46,7 +46,7 @@ export type box = (mac, nonce, []u8); // The return value contains all of the information which should be transmitted // to the other party, including the computed MAC, a copy of the nonce, and the // ciphertext. It is safe to transmit these values over an unsecured connection, -// or to encode them with something like [[encoding::base64]]. +// or to encode them with something like [[encoding::base64::]]. // // Any 'additional' data, if provided, is not included in the [[box]] type. The // user must provide for this data to be transmitted to the other party diff --git a/crypto/bcrypt/README b/crypto/bcrypt/README @@ -5,6 +5,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/bigint/README b/crypto/bigint/README @@ -18,6 +18,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level -operations available in the top-level [[crypto]] module. +operations available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/blake2b/README b/crypto/blake2b/README @@ -6,6 +6,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/blowfish/README b/crypto/blowfish/README @@ -1,15 +1,16 @@ The crypto::blowfish module provides an implementation of Bruce Schneier's Blowfish encryption standard via the [[crypto::cipher::block]] interface. The use of this algorithm is not recommended except for legacy use-cases; prefer -[[crypto::aes]] when possible. +[[crypto::aes::]] when possible. -When combined with a block cipher mode from [[crypto::cipher]], suitable buffer -lengths for static allocation are provided as constants such as [[BLOCKSZ]]. +When combined with a block cipher mode from [[crypto::cipher::]], suitable +buffer lengths for static allocation are provided as constants such as +[[BLOCKSZ]]. This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/chacha/README b/crypto/chacha/README @@ -15,6 +15,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level -operations available in the top-level [[crypto]] module. +operations available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/chachapoly/README b/crypto/chachapoly/README @@ -13,6 +13,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/cipher/README b/crypto/cipher/README @@ -5,12 +5,12 @@ modes. Block ciphers in Hare rely upon caller-provided buffer allocations, and do not allocate memory at runtime. Consult the documentation for the underlying -algorithm, e.g. [[crypto::aes]], for the appropriate buffer sizes to use. +algorithm, e.g. [[crypto::aes::]], for the appropriate buffer sizes to use. This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/curve25519/README b/crypto/curve25519/README @@ -8,6 +8,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/ed25519/README b/crypto/ed25519/README @@ -7,6 +7,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/ed25519/ed25519.ha b/crypto/ed25519/ed25519.ha @@ -26,7 +26,7 @@ export type pubkey = [PUBKEYSZ]u8; export type seed = [SEEDSZ]u8; // Derives a new Ed25519 private key from a given seed. The seed must be -// initialized to cryptographically random data; [[crypto::random]] is +// initialized to cryptographically random data; [[crypto::random::]] is // recommended for this purpose. export fn privkey_init(priv: []u8, seed: []u8) void = { assert(len(priv) == PRIVKEYSZ); diff --git a/crypto/hmac/README b/crypto/hmac/README @@ -5,6 +5,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/keyderiv.ha b/crypto/keyderiv.ha @@ -15,7 +15,7 @@ use errors; // // The salt parameter should be randomly generated, stored alongside the key, // and used in subsequent calls to produce the same key. It must be at least 8 -// bytes, but 16 bytes is recommended. Use [[crypto::random]] to generate a +// bytes, but 16 bytes is recommended. Use [[crypto::random::]] to generate a // different salt for each key. // // The 'mem' and 'passes' functions are provided to tune the behavior of this diff --git a/crypto/keystore/README b/crypto/keystore/README @@ -12,6 +12,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/math/README b/crypto/math/README @@ -5,6 +5,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/poly1305/README b/crypto/poly1305/README @@ -4,6 +4,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/random/README b/crypto/random/README @@ -2,4 +2,4 @@ crypto::random provides a cryptographically secure random number generator, which yields a nondeterministic sequence of random numbers. If true randomness isn't required for your use case, you may be better off using -[[math::random]]'s pseudorandom number generator. +[[math::random::]]'s pseudorandom number generator. diff --git a/crypto/rsa/README b/crypto/rsa/README @@ -13,6 +13,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level -operations available in the top-level [[crypto]] module. +operations available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/salsa/README b/crypto/salsa/README @@ -15,6 +15,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/sha1/sha1.ha b/crypto/sha1/sha1.ha @@ -35,8 +35,8 @@ const sha1_vtable: io::vtable = io::vtable { // Creates a [[hash::hash]] which computes a SHA-1 hash. Note that this // algorithm is no longer considered secure. Where possible, applications are -// encouraged to use [[crypto::sha256]] or [[crypto::sha512]] instead. If this -// function is used to hash sensitive information, the caller should call +// encouraged to use [[crypto::sha256::]] or [[crypto::sha512::]] instead. If +// this function is used to hash sensitive information, the caller should call // [[hash::close]] to erase sensitive data from memory after use; if not, the // use of [[hash::close]] is optional. export fn sha1() state = { diff --git a/crypto/x25519/README b/crypto/x25519/README @@ -11,6 +11,6 @@ This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations -available in the top-level [[crypto]] module. +available in the top-level [[crypto::]] module. Be advised that Hare's cryptography implementations have not been audited. diff --git a/crypto/x25519/x25519.ha b/crypto/x25519/x25519.ha @@ -13,7 +13,7 @@ export def KEYSZ: size = 32; export def SEEDSZ: size = 32; // Initializes a new x25519 private key from the provided 32-byte seed, -// which should be generated with [[crypto::random]]. +// which should be generated with [[crypto::random::]]. export fn newkey(priv: []u8, seed: []u8) void = { assert(len(priv) == KEYSZ); assert(len(seed) == SEEDSZ); diff --git a/fs/README b/fs/README @@ -1,4 +1,4 @@ The fs module provides an abstracted interface for accessing an arbitrary filesystem. If you want to work with the host filesystem, you probably want to -refer to the functions available in [[os]] instead, which provides an +refer to the functions available in [[os::]] instead, which provides an implementation of [[fs::fs]] for the host filesystem. diff --git a/hare/README b/hare/README @@ -1,11 +1,2 @@ The hare namespace provides various modules which can be used to work with Hare code itself (how meta). The modules available are: - -- [[hare::ast]]: data structures representing Hare's Abstract Syntax Tree -- [[hare::eval]]: interpreter for the "translation compatible subset" of Hare -- [[hare::lex]]: a lexer for Hare programs -- [[hare::module]]: module resolution and Hare cache management -- [[hare::parse]]: a parser for Hare programs -- [[hare::types]]: an implementation of the Hare type system -- [[hare::unit]]: Hare type checker -- [[hare::unparse]]: a Hare "unparser", converts [[hare::ast]] into source code diff --git a/hare/parse/README b/hare/parse/README @@ -6,4 +6,4 @@ functions provide parsers for various important Hare sub-terminals, such as https://harelang.org/specification Most of these functions require the caller to provide a Hare lexer, see -[[hare::lex]] for details. +[[hare::lex::]] for details. diff --git a/hare/types/README b/hare/types/README @@ -1,3 +1,3 @@ hare::types provides an implementation of the Hare type system. See [[store]] to initialize a type store and [[lookup]] for looking up Hare types from their -[[hare::ast]] representation. +[[hare::ast::]] representation. diff --git a/io/README b/io/README @@ -1,7 +1,7 @@ The io module provides input and output (I/O) functionality for Hare programs, such as reading from or writing to files. The I/O module is not generally -responsible for provisioning the I/O objects themselves; see modules like [[os]] -and [[net]] for this purpose. +responsible for provisioning the I/O objects themselves; see modules like +[[os::]] and [[net::]] for this purpose. I/O operations such as [[read]] or [[write]] accept an I/O handle, [[handle]], to specify the object of the I/O operation. This type is a tagged union of @@ -11,11 +11,11 @@ unless they specifically require the special semantics of one of its subtypes. The [[file]] type provides access to an object, usually a file descriptor, which is provided by the host operating system. It represents objects such as a file on disk, an open network connection, and so on. The use of [[file]] is generally -required when working with host I/O, such as with [[unix::poll]]. +required when working with host I/O, such as with [[unix::poll::]]. The [[stream]] type is an abstraction that allows Hare programs to implement their own I/O objects by providing implementations of [[read]], [[write]], and other functions, for an [[handle]]. Several standard library modules offer -implementations of [[stream]] for one reason or another, such as [[bufio]]. +implementations of [[stream]] for one reason or another, such as [[bufio::]]. Additionally, the io module provides some useful general-purpose I/O streams, such as [[tee]]. diff --git a/math/random/README b/math/random/README @@ -2,5 +2,5 @@ math::random provides a pseudorandom number generator, which yields a deterministic sequence of psuedo-random numbers based on a seed value. Beware! This module is NOT suitable for generating genuinely random data for -cryptographic use. See [[crypto::random]] for cryptographically secure random +cryptographic use. See [[crypto::random::]] for cryptographically secure random number generation. diff --git a/memio/README b/memio/README @@ -7,5 +7,5 @@ You can access the contents of the buffer via [[buffer]] and [[string]]. Additionally, memio provides string-related I/O operations. Each of the utility functions (e.g. [[appendrune]]) work correctly with any [[io::handle]], but -for efficiency reasons it is recommended that they are either a memio or -[[bufio]] stream. +for efficiency reasons it is recommended that they are either a memio:: or +[[bufio::]] stream. diff --git a/net/README b/net/README @@ -1,6 +1,7 @@ The net module provides some general-purpose interfaces and support code, but generally users are directed to the submodules, where implementations of -various network protocols are provided, such as [[net::tcp]] or [[net::dns]]. +various network protocols are provided, such as [[net::tcp::]] or +[[net::dns::]]. A porcelain API for establishing an outgoing connection, able to automatically -handle matters such as DNS resolution, is available at [[net::dial]]. +handle matters such as DNS resolution, is available at [[net::dial::]]. diff --git a/net/dns/error.ha b/net/dns/error.ha @@ -54,7 +54,7 @@ export type bad_time = !void; // Any other server-provided error condition not known to Hare. export type unknown_error = !u8; -// All error types which might be returned from [[net::dns]] functions. +// All error types which might be returned from functions in this module. export type error = !(format | server_failure | name_error | not_implemented | refused | name_exists | rrset_exists | rrset_error | not_auth | not_zone diff --git a/net/unix/README b/net/unix/README @@ -1,4 +1,4 @@ net::unix provides access to Unix sockets for networking. -A protocol provider for [[net::dial]] is provided by this module, but you must +A protocol provider for [[net::dial::]] is provided by this module, but you must import net::unix at least once in order for it to be visible to net::dial. diff --git a/os/README b/os/README @@ -1,7 +1,7 @@ The os module provides access to resources from the host operating system, particularly to the filesystem and standard I/O. [[cwd]] provides an implementation of [[fs::fs]] which is backed by the host filesystem, and this -module provides equivalents of various [[fs]] functions which infer the current -working directory as the fs parameter. This module also provides various +module provides equivalents of various [[fs::]] functions which infer the +current working directory as the fs parameter. This module also provides various non-filesystem related features from the host, such as the hostname, environment variables, and so on. diff --git a/path/README b/path/README @@ -2,7 +2,7 @@ The path module provides utilities for working with filesystem paths. Note that Hare expects paths to be valid UTF-8 strings. If you require the use of non-UTF-8 paths (ideally for only as long as it takes to delete or rename -those files), see the low-level functions available from [[rt]]. +those files), see the low-level functions available from [[rt::]]. Use of the [[buffer]] type is recommended for efficient and consistent manipulation of filesystem paths. The path will always be diff --git a/strings/template/README b/strings/template/README @@ -1,5 +1,5 @@ This module provides support for formatting of large or complex strings beyond -the scope of [[fmt]]. A template is compiled using [[compile]], then executed +the scope of [[fmt::]]. A template is compiled using [[compile]], then executed with [[execute]] to print formatted text to an [[io::handle]]. The template format is a string with variables substituted using "$". Variable diff --git a/time/README b/time/README @@ -1,3 +1,3 @@ The time module provides basic timekeeping primitives and system clock access. -See [[time::chrono]] for timescales, timezones, and other chronology primitives. -See [[time::date]] for the Gregorian chronology. +See [[time::chrono::]] for timescales, timezones, and other chronology +primitives. See [[time::date::]] for the Gregorian chronology. diff --git a/time/chrono/README b/time/chrono/README @@ -1,6 +1,6 @@ The time::chrono module provides timescale utilities, and the foundations for chronology with the [[moment]] type, an abstract, extendable date/time object. -For the Gregorian chronology, see the [[time::date]] module. +For the Gregorian chronology, see the [[time::date::]] module. Hare defines a chronology as a system for naming and ordering moments in time. In practice, it is the combination of a calendar and wall clock. This module diff --git a/time/chrono/error.ha b/time/chrono/error.ha @@ -6,7 +6,7 @@ use fmt; use fs; use io; -// All possible errors returned from [[time::chrono]]. +// All possible errors returned from this module. export type error = !( invalid | invalidtzif diff --git a/time/date/README b/time/date/README @@ -2,8 +2,8 @@ The time::date module implements the common international Gregorian chronology, based on the astronomically numbered proleptic Gregorian calendar, as per ISO 8601, and the common 24 hour clock. It provides [[date]], a representation of civil date/time and a optimized extension of the [[time::chrono::moment]] type. -The [[time::chrono]] module has many useful functions which interoperate with -dates. Any [[time::chrono]] function which accepts *moment also accepts *date. +The [[time::chrono::]] module has many useful functions which interoperate with +dates. Any [[time::chrono::]] function which accepts *moment also accepts *date. Dates are created using [[new]], [[now]], [[nowutc]], or a "from_" function. Alternatively, the [[virtual]]/[[realize]] interface can handle uncertain or diff --git a/types/README b/types/README @@ -1,5 +1,5 @@ The types module provides access to some information about the Hare type system. It provides constants like [[INT_MAX]], which defines the useful range for -integer types (see [[math]] for f32 and f64 limits), as well as types like +integer types (see [[math::]] for f32 and f64 limits), as well as types like [[slice]], which describe the internal structure of data types like slices and str. diff --git a/types/c/README b/types/c/README @@ -22,7 +22,8 @@ Some C types are mostly compatible with Hare types, with minor differences: undefined-size opaque type. - Hare doesn't have builtin imaginary or complex types, though complex types with equivalent represention to their C counterparts are declared in - [[math::complex]]. Hare doesn't allow casting between real and complex types + [[math::complex::]]. Hare doesn't allow casting between real and complex types like C does. -Additional low-level or implementation-specific types may be defined in [[rt]]. +Additional low-level or implementation-specific types may be defined in +[[rt::]]. diff --git a/unix/+freebsd/groups.ha b/unix/+freebsd/groups.ha @@ -16,6 +16,6 @@ export fn getgroups() []uint = { // If the system returns an error, this function will abort the program. Failing // to handle errors from setgroups is a grave security issue in your program, // and therefore we require this function to succeed. If you need to handle the -// error case gracefully, call the appropriate syscall wrapper in [[rt]] +// error case gracefully, call the appropriate syscall wrapper in [[rt::]] // yourself, and take extreme care to handle errors correctly. export fn setgroups(gids: []uint) void = rt::setgroups(gids)!; diff --git a/unix/+freebsd/setuid.ha b/unix/+freebsd/setuid.ha @@ -9,9 +9,9 @@ use rt; // If the system returns an error, this function will abort the program. Failing // to handle errors from setuid is a grave security issue in your program, and // therefore we require this function to succeed. If you need to handle the -// error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, -// and take extreme care to handle errors correctly. -export fn setuid(uid: uint) void = rt::setresuid(uid, -1i: uint, -1i: uint) as void; +// error case gracefully, call the appropriate syscall wrapper in [[rt::]] +// yourself, and take extreme care to handle errors correctly. +export fn setuid(uid: uint) void = rt::setresuid(uid, -1i: uint, -1i: uint)!; // Sets the caller's effective user ID to the specified value. This generally // requires elevated permissions from the calling process. @@ -19,9 +19,9 @@ export fn setuid(uid: uint) void = rt::setresuid(uid, -1i: uint, -1i: uint) as v // If the system returns an error, this function will abort the program. Failing // to handle errors from seteuid is a grave security issue in your program, and // therefore we require this function to succeed. If you need to handle the -// error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, -// and take extreme care to handle errors correctly. -export fn seteuid(uid: uint) void = rt::setresuid(-1i: uint, uid, -1i: uint) as void; +// error case gracefully, call the appropriate syscall wrapper in [[rt::]] +// yourself, and take extreme care to handle errors correctly. +export fn seteuid(uid: uint) void = rt::setresuid(-1i: uint, uid, -1i: uint)!; // Sets the caller's group ID to the specified value. This generally requires // elevated permissions from the calling process. @@ -29,9 +29,9 @@ export fn seteuid(uid: uint) void = rt::setresuid(-1i: uint, uid, -1i: uint) as // If the system returns an error, this function will abort the program. Failing // to handle errors from setuid is a grave security issue in your program, and // therefore we require this function to succeed. If you need to handle the -// error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, -// and take extreme care to handle errors correctly. -export fn setgid(gid: uint) void = rt::setresgid(gid, -1i: uint, -1i: uint) as void; +// error case gracefully, call the appropriate syscall wrapper in [[rt::]] +// yourself, and take extreme care to handle errors correctly. +export fn setgid(gid: uint) void = rt::setresgid(gid, -1i: uint, -1i: uint)!; // Sets the caller's effective group ID to the specified value. This generally // requires elevated permissions from the calling process. @@ -39,6 +39,6 @@ export fn setgid(gid: uint) void = rt::setresgid(gid, -1i: uint, -1i: uint) as v // If the system returns an error, this function will abort the program. Failing // to handle errors from setegid is a grave security issue in your program, and // therefore we require this function to succeed. If you need to handle the -// error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, -// and take extreme care to handle errors correctly. -export fn setegid(gid: uint) void = rt::setresgid(-1i: uint, gid, -1i: uint) as void; +// error case gracefully, call the appropriate syscall wrapper in [[rt::]] +// yourself, and take extreme care to handle errors correctly. +export fn setegid(gid: uint) void = rt::setresgid(-1i: uint, gid, -1i: uint)!; diff --git a/unix/+linux/groups.ha b/unix/+linux/groups.ha @@ -16,6 +16,6 @@ export fn getgroups() []uint = { // If the system returns an error, this function will abort the program. Failing // to handle errors from setgroups is a grave security issue in your program, // and therefore we require this function to succeed. If you need to handle the -// error case gracefully, call the appropriate syscall wrapper in [[rt]] +// error case gracefully, call the appropriate syscall wrapper in [[rt::]] // yourself, and take extreme care to handle errors correctly. export fn setgroups(gids: []uint) void = rt::setgroups(gids)!; diff --git a/unix/+linux/setuid.ha b/unix/+linux/setuid.ha @@ -9,9 +9,9 @@ use rt; // If the system returns an error, this function will abort the program. Failing // to handle errors from setuid is a grave security issue in your program, and // therefore we require this function to succeed. If you need to handle the -// error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, -// and take extreme care to handle errors correctly. -export fn setuid(uid: uint) void = rt::setresuid(uid, -1i: uint, -1i: uint) as void; +// error case gracefully, call the appropriate syscall wrapper in [[rt::]] +// yourself, and take extreme care to handle errors correctly. +export fn setuid(uid: uint) void = rt::setresuid(uid, -1i: uint, -1i: uint)!; // Sets the caller's effective user ID to the specified value. This generally // requires elevated permissions from the calling process. @@ -19,9 +19,9 @@ export fn setuid(uid: uint) void = rt::setresuid(uid, -1i: uint, -1i: uint) as v // If the system returns an error, this function will abort the program. Failing // to handle errors from seteuid is a grave security issue in your program, and // therefore we require this function to succeed. If you need to handle the -// error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, -// and take extreme care to handle errors correctly. -export fn seteuid(uid: uint) void = rt::setresuid(-1i: uint, uid, -1i: uint) as void; +// error case gracefully, call the appropriate syscall wrapper in [[rt::]] +// yourself, and take extreme care to handle errors correctly. +export fn seteuid(uid: uint) void = rt::setresuid(-1i: uint, uid, -1i: uint)!; // Sets the caller's group ID to the specified value. This generally requires // elevated permissions from the calling process. @@ -29,9 +29,9 @@ export fn seteuid(uid: uint) void = rt::setresuid(-1i: uint, uid, -1i: uint) as // If the system returns an error, this function will abort the program. Failing // to handle errors from setuid is a grave security issue in your program, and // therefore we require this function to succeed. If you need to handle the -// error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, -// and take extreme care to handle errors correctly. -export fn setgid(gid: uint) void = rt::setresgid(gid, -1i: uint, -1i: uint) as void; +// error case gracefully, call the appropriate syscall wrapper in [[rt::]] +// yourself, and take extreme care to handle errors correctly. +export fn setgid(gid: uint) void = rt::setresgid(gid, -1i: uint, -1i: uint)!; // Sets the caller's effective group ID to the specified value. This generally // requires elevated permissions from the calling process. @@ -39,6 +39,6 @@ export fn setgid(gid: uint) void = rt::setresgid(gid, -1i: uint, -1i: uint) as v // If the system returns an error, this function will abort the program. Failing // to handle errors from setegid is a grave security issue in your program, and // therefore we require this function to succeed. If you need to handle the -// error case gracefully, call the appropriate syscall wrapper in [[rt]] yourself, -// and take extreme care to handle errors correctly. -export fn setegid(gid: uint) void = rt::setresgid(-1i: uint, gid, -1i: uint) as void; +// error case gracefully, call the appropriate syscall wrapper in [[rt::]] +// yourself, and take extreme care to handle errors correctly. +export fn setegid(gid: uint) void = rt::setresgid(-1i: uint, gid, -1i: uint)!;