hare

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

commit 59e47486b111886fc6de8f6be54f6b6715e53d2d
parent f173d66f5761b20ea71688caf5f3f2e66cce88dd
Author: Sertonix <sertonix@posteo.net>
Date:   Wed,  1 Nov 2023 13:50:28 +0000

*: remove full module name usage

Diffstat:
Mcrypto/chachapoly/chachapoly.ha | 2+-
Mcrypto/cipher/cbc.ha | 4++--
Mcrypto/rsa/pkcs1.ha | 2+-
Mtest/+test.ha | 2+-
Mtime/chrono/leapsec.ha | 4++--
Mtime/chrono/tzdb.ha | 4++--
Mtime/date/date.ha | 2+-
Mtime/date/virtual.ha | 4++--
8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/crypto/chachapoly/chachapoly.ha b/crypto/chachapoly/chachapoly.ha @@ -147,7 +147,7 @@ fn writemac(s: *stream, tag: []u8) void = { export fn verify(s: *stream, tag: []u8) (void | errors::invalid) = { let ntag: [TAGSZ]u8 = [0...]; writemac(s, ntag); - if (crypto::math::eqslice(ntag, tag) == 0) { + if (math::eqslice(ntag, tag) == 0) { return errors::invalid; }; }; diff --git a/crypto/cipher/cbc.ha b/crypto/cipher/cbc.ha @@ -71,7 +71,7 @@ export fn cbc_encrypt(c: *cbc_mode, dest: []u8, src: []u8) void = { for (let i = 0z; i < len(dest); i += sz) { let eb = i + sz; - crypto::math::xor(dest[i..eb], src[i..eb], c.carry); + math::xor(dest[i..eb], src[i..eb], c.carry); encrypt(c.b, dest[i..eb], dest[i..eb]); c.carry[..] = dest[i..eb]; }; @@ -91,6 +91,6 @@ export fn cbc_decrypt(c: *cbc_mode, dest: []u8, src: []u8) void = { c.carrybuf[..] = c.carry[..]; c.carry[..] = src[i..eb]; decrypt(c.b, dest[i..eb], src[i..eb]); - crypto::math::xor(dest[i..eb], dest[i..eb], c.carrybuf); + math::xor(dest[i..eb], dest[i..eb], c.carrybuf); }; }; diff --git a/crypto/rsa/pkcs1.ha b/crypto/rsa/pkcs1.ha @@ -87,7 +87,7 @@ export fn pkcs1_verify( let expectedsig = pubbuf[..len(sig)]; pkcs1_sig_encode(expectedsig, msghash, algo)?; - if (crypto::math::eqslice(expectedsig, actualsig) == 0) { + if (math::eqslice(expectedsig, actualsig) == 0) { return badsig; }; }; diff --git a/test/+test.ha b/test/+test.ha @@ -60,7 +60,7 @@ fn finish_context(ctx: *context) void = { fn colored() bool = { return len(os::tryenv("NO_COLOR", "")) == 0 - && unix::tty::isatty(os::stdout_file); + && tty::isatty(os::stdout_file); }; let jmpbuf = rt::jmpbuf { ... }; diff --git a/time/chrono/leapsec.ha b/time/chrono/leapsec.ha @@ -29,7 +29,7 @@ use strings; // timescales. Therefore, we have decided to take an alternative approach. // Error initializing the [[utc]] [[timescale]]. -type utciniterror = !(fs::error | io::error | encoding::utf8::invalid); +type utciniterror = !(fs::error | io::error | utf8::invalid); // The number of seconds between the years 1900 and 1970. // @@ -58,7 +58,7 @@ fn init_utc_leapsecs() (void | utciniterror) = { fn parse_utc_leapsecs( h: io::handle, leapsecs: *[](i64, i64), -) (void | encoding::utf8::invalid | io::error) = { +) (void | utf8::invalid | io::error) = { for (true) { const line = match (bufio::read_line(h)) { case let err: io::error => diff --git a/time/chrono/tzdb.ha b/time/chrono/tzdb.ha @@ -184,7 +184,7 @@ fn load_tzif(h: io::handle, tz: *timezone) (void | invalidtzif | io::error) = { const posix_extend = strings::dup(match (strings::fromutf8(footerdata)) { case let s: str => yield s; - case encoding::utf8::invalid => + case utf8::invalid => return invalidtzif; }); @@ -231,7 +231,7 @@ fn load_tzif(h: io::handle, tz: *timezone) (void | invalidtzif | io::error) = { const abbr = match (strings::fromutf8(bytes)) { case let s: str => yield s; - case encoding::utf8::invalid => + case utf8::invalid => return invalidtzif; }; zone.abbr = strings::dup(abbr); diff --git a/time/date/date.ha b/time/date/date.ha @@ -227,7 +227,7 @@ export fn from_instant(loc: chrono::locality, i: time::instant) date = { export fn from_str( layout: str, s: str, - locs: time::chrono::locality... + locs: chrono::locality... ) (date | parsefail | insufficient | invalid) = { const v = newvirtual(); v.zoff = 0; diff --git a/time/date/virtual.ha b/time/date/virtual.ha @@ -34,7 +34,7 @@ export type insufficient = !void; export type virtual = struct { date, // virtual's locality - vloc: (void | time::chrono::locality), + vloc: (void | chrono::locality), // locality name locname: (void | str), // zone offset @@ -116,7 +116,7 @@ export fn newvirtual() virtual = virtual { // [[invalid]] is returned. export fn realize( v: virtual, - locs: time::chrono::locality... + locs: chrono::locality... ) (date | insufficient | invalid) = { // determine .daydate if (v.daydate is i64) {