diff --git a/fjs/ci/bun/module.f.mjs b/fjs/ci/bun/module.f.mjs index 1c2e6214d7..6479bb24bb 100644 --- a/fjs/ci/bun/module.f.mjs +++ b/fjs/ci/bun/module.f.mjs @@ -3,10 +3,12 @@ * FunctionalScript package smoke test plus Bun coverage in one canonical job. * * @module + * + * @import { MetaStep } from '../common/types.ts' */ + import { bun } from '../config/module.f.mjs' import { install, test, uses } from '../common/module.f.mjs' -/** @import { MetaStep } from '../common/types.ts' */ /** @type {(version: string) => readonly MetaStep[]} */ export const bunSteps = version => [ diff --git a/fjs/ci/common/module.f.mjs b/fjs/ci/common/module.f.mjs index e43f3fd90f..0324dc61d1 100644 --- a/fjs/ci/common/module.f.mjs +++ b/fjs/ci/common/module.f.mjs @@ -6,11 +6,12 @@ * `MetaStep` type-level API. * * @module + * + * @import { Step, Job, MetaStep, StepType } from './types.ts' */ import { actions, images } from '../config/module.f.mjs' import { option, array, record, string } from '../../types/rtti/module.f.mjs' import { parse as rttiParse } from '../../types/rtti/parse/module.f.mjs' -/** @import { Step, Job, MetaStep, StepType } from './types.ts' */ export const os = /** @type {const} */ (['ubuntu', 'macos', 'windows']) diff --git a/fjs/ci/deno/module.f.mjs b/fjs/ci/deno/module.f.mjs index 34fd133f2e..0eccfaf5b4 100644 --- a/fjs/ci/deno/module.f.mjs +++ b/fjs/ci/deno/module.f.mjs @@ -3,10 +3,12 @@ * FunctionalScript package smoke test plus Deno coverage in one canonical job. * * @module + * + * @import { MetaStep } from '../common/types.ts' */ + import { deno } from '../config/module.f.mjs' import { install, test, uses } from '../common/module.f.mjs' -/** @import { MetaStep } from '../common/types.ts' */ const denoTest = 'deno test --allow-read --allow-env --allow-sys' diff --git a/fjs/ci/module.f.mjs b/fjs/ci/module.f.mjs index fbe1b6aaf7..b213a63037 100644 --- a/fjs/ci/module.f.mjs +++ b/fjs/ci/module.f.mjs @@ -4,12 +4,16 @@ * See `./types.ts` for the `Setup` type-level API. * * @module + * + * @import { Effect } from '../effects/types.ts' + * @import { NodeOp } from '../effects/node/types.ts' + * @import { Architecture, GitHubAction, Job, Jobs, MetaStep, Os } from './common/types.ts' + * @import { NixJob } from './nix/types.ts' + * @import { Setup } from './types.ts' */ import { mapStep, step } from '../effects/module.f.mjs' -/** @import { Effect } from '../effects/types.ts' */ import { access, writeUtf8File } from '../effects/node/module.f.mjs' -/** @import { NodeOp } from '../effects/node/types.ts' */ import { functionalscript, images } from './config/module.f.mjs' import { architecture, @@ -17,14 +21,11 @@ import { toSteps, ubuntuArm } from './common/module.f.mjs' -/** @import { Architecture, GitHubAction, Job, Jobs, MetaStep, Os } from './common/types.ts' */ import { rustPlatformSteps, rustWasmSteps } from './rust/module.f.mjs' import { nodeMainSteps, nodeNixJobs, nodeNixVersionSteps, nodeVersionJobs } from './node/module.f.mjs' import { nixFlakes, nixInstall } from './nix/module.f.mjs' -/** @import { NixJob } from './nix/types.ts' */ import { bunSteps } from './bun/module.f.mjs' import { denoSteps } from './deno/module.f.mjs' -/** @import { Setup } from './types.ts' */ /** @type {(rust: boolean, nodeExtra: readonly MetaStep[]) => (o: Os) => (a: Architecture) => readonly [string, Job]} */ const job = (rust, nodeExtra) => o => a => { diff --git a/fjs/ci/nix/module.f.mjs b/fjs/ci/nix/module.f.mjs index 00e6bf00cd..bc8d88b652 100644 --- a/fjs/ci/nix/module.f.mjs +++ b/fjs/ci/nix/module.f.mjs @@ -10,20 +10,21 @@ * See `./types.ts` for the `NixJob` type-level API. * * @module + * + * @import { Effect } from '../../effects/types.ts' + * @import { Mkdir, WriteFile } from '../../effects/node/types.ts' + * @import { Expression } from '../../media/nix/types.ts' + * @import { MetaStep } from '../common/types.ts' + * @import { NixJob } from './types.ts' */ import { forEachStep, mapStep, pure, step } from '../../effects/module.f.mjs' -/** @import { Effect } from '../../effects/types.ts' */ import { mkdir, writeUtf8File } from '../../effects/node/module.f.mjs' -/** @import { Mkdir, WriteFile } from '../../effects/node/types.ts' */ import { nixToString } from '../../media/nix/module.f.mjs' -/** @import { Expression } from '../../media/nix/types.ts' */ import { fromUndefined, unwrap as unwrapNullable } from '../../types/nullable/module.f.mjs' import { unwrap } from '../../types/result/module.f.mjs' import { install, test, uses } from '../common/module.f.mjs' -/** @import { MetaStep } from '../common/types.ts' */ import { nixpkgs } from '../config/module.f.mjs' -/** @import { NixJob } from './types.ts' */ /** Directory owned by this generator. */ export const generatedDirectory = /** @type {const} */ ('nix/generated') diff --git a/fjs/ci/nix/proof.f.ts b/fjs/ci/nix/proof.f.ts index 55165236b7..5ae9e377fa 100644 --- a/fjs/ci/nix/proof.f.ts +++ b/fjs/ci/nix/proof.f.ts @@ -3,6 +3,9 @@ * * @module */ + +import type { NixJob } from './types.ts' + import { assert, assertEq } from '../../asserts/module.f.mjs' import { step } from '../../effects/module.f.mjs' import { readUtf8File } from '../../effects/node/module.f.mjs' @@ -18,7 +21,6 @@ import { nixFlakes, nixInstall, } from './module.f.mjs' -import type { NixJob } from './types.ts' const { commit } = nixpkgs diff --git a/fjs/ci/node/module.f.mjs b/fjs/ci/node/module.f.mjs index 7cae01b798..ecc3551384 100644 --- a/fjs/ci/node/module.f.mjs +++ b/fjs/ci/node/module.f.mjs @@ -3,13 +3,14 @@ * per-version canonical jobs. * * @module + * + * @import { Job, Jobs, MetaStep, Step } from '../common/types.ts' + * @import { NixJob } from '../nix/types.ts' */ import { node } from '../config/module.f.mjs' import { install, test, ubuntuArm, uses } from '../common/module.f.mjs' -/** @import { Job, Jobs, MetaStep, Step } from '../common/types.ts' */ import { nixInstall, nixVersionCheckStep } from '../nix/module.f.mjs' -/** @import { NixJob } from '../nix/types.ts' */ /** @type {(v: string) => string} */ export const major = v => v.split('.')[0] diff --git a/fjs/ci/proof.f.ts b/fjs/ci/proof.f.ts index b7386598c1..f8424a091e 100644 --- a/fjs/ci/proof.f.ts +++ b/fjs/ci/proof.f.ts @@ -1,3 +1,6 @@ +import type { MetaStep, Os, GitHubAction } from './common/types.ts' +import type { Dir, State } from '../effects/node/virtual/types.ts' + import { ci, main } from './module.f.mjs' import { functionalscript, node } from './config/module.f.mjs' import { nodeNixJobs } from './node/module.f.mjs' @@ -5,14 +8,13 @@ import { coverageInclude } from './deno/module.f.mjs' import { utf8, utf8ToString } from '../text/module.f.mjs' import { empty as emptyVec } from '../types/bit_vec/module.f.mjs' import { test, ubuntu, parseGitHubAction } from './common/module.f.mjs' -import type { MetaStep, Os, GitHubAction } from './common/types.ts' import { assert, assertEq } from '../asserts/module.f.mjs' import { emptyState, virtual } from '../effects/node/virtual/module.f.mjs' -import type { Dir, State } from '../effects/node/virtual/types.ts' -import { parse as jsonParse } from '../media/json/module.f.ts' import { unwrap } from '../types/result/module.f.mjs' import { definedValues } from '../types/object/module.f.mjs' +import { parse as jsonParse } from '../media/json/module.f.ts' + const hasRun = (cmd: string) => (gha: GitHubAction): boolean => definedValues(gha.jobs).some(job => job.steps.some(step => step.run?.includes(cmd))) diff --git a/fjs/ci/rust/module.f.mjs b/fjs/ci/rust/module.f.mjs index c77b7bf812..97b3bd041b 100644 --- a/fjs/ci/rust/module.f.mjs +++ b/fjs/ci/rust/module.f.mjs @@ -5,10 +5,12 @@ * target. * * @module + * + * @import { Architecture, MetaStep, Os } from '../common/types.ts' */ + import { wasmer, wasmtime } from '../config/module.f.mjs' import { install, test, uses } from '../common/module.f.mjs' -/** @import { Architecture, MetaStep, Os } from '../common/types.ts' */ /** @type {(tool: 'clippy' | 'test', target?: string, config?: string) => string} */ const cargoCommand = (tool, target, config) => { diff --git a/fjs/cli/module.f.mjs b/fjs/cli/module.f.mjs index fc476ea756..00fba8f1f5 100644 --- a/fjs/cli/module.f.mjs +++ b/fjs/cli/module.f.mjs @@ -4,14 +4,15 @@ * See `./types.ts` for the type-level API. * * @module + * + * @import { NodeOp, NodeProgramOptions, Write } from '../effects/node/types.ts' + * @import { Effect } from '../effects/types.ts' + * @import { Commands } from './types.ts' */ import { errorExit, log } from '../effects/node/module.f.mjs' -/** @import { NodeOp, NodeProgramOptions, Write } from '../effects/node/types.ts' */ import { pure, step } from '../effects/module.f.mjs' -/** @import { Effect } from '../effects/types.ts' */ import { at, fromEntries } from '../types/object/module.f.mjs' -/** @import { Commands } from './types.ts' */ const helpMeta = { names: ['help', 'h', '?'], description: 'Print this help message' } diff --git a/fjs/cli/proof.f.ts b/fjs/cli/proof.f.ts index 41a53a4531..02dacde88c 100644 --- a/fjs/cli/proof.f.ts +++ b/fjs/cli/proof.f.ts @@ -1,8 +1,9 @@ -import { pure } from '../effects/module.f.mjs' import type { NodeOp, NodeProgramOptions } from '../effects/node/types.ts' +import type { Commands } from './types.ts' + +import { pure } from '../effects/module.f.mjs' import { defaultNodeProgramOptions, emptyState, virtual } from '../effects/node/virtual/module.f.mjs' import { dispatch } from './module.f.mjs' -import type { Commands } from './types.ts' import { assert, assertEq } from '../asserts/module.f.mjs' const makeOptions = (args: readonly string[]): NodeProgramOptions => diff --git a/fjs/common/monoid/module.f.mjs b/fjs/common/monoid/module.f.mjs index f22d4637fd..6e6d08c4f1 100644 --- a/fjs/common/monoid/module.f.mjs +++ b/fjs/common/monoid/module.f.mjs @@ -5,12 +5,14 @@ * of a list. * * @module + * + * @import { Fold } from '../../types/function/operator/types.ts' + * @import { List } from '../../types/list/types.ts' + * @import { Monoid } from './types.ts' */ -/** @import { Fold } from '../../types/function/operator/types.ts' */ + import { reduce } from '../../types/list/module.f.mjs' -/** @import { List } from '../../types/list/types.ts' */ import { flip } from '../../types/function/module.f.mjs' -/** @import { Monoid } from './types.ts' */ /** * Repeats a monoid operation `n` times on the given element `a`. diff --git a/fjs/common/monoid/proof.f.ts b/fjs/common/monoid/proof.f.ts index 6685432aef..a249f7b448 100644 --- a/fjs/common/monoid/proof.f.ts +++ b/fjs/common/monoid/proof.f.ts @@ -1,5 +1,6 @@ -import type { Monoid } from "./types.ts" -import { repeat, fold } from "./module.f.mjs"; +import type { Monoid } from './types.ts' + +import { repeat, fold } from './module.f.mjs' import { assertEq } from '../../asserts/module.f.mjs' export const proof = { diff --git a/fjs/crypto/hmac/module.f.mjs b/fjs/crypto/hmac/module.f.mjs index 5fa9462e86..69adfade3b 100644 --- a/fjs/crypto/hmac/module.f.mjs +++ b/fjs/crypto/hmac/module.f.mjs @@ -16,11 +16,12 @@ * const r = hmac(sha256)(msbUtf8('key'))(msbUtf8('The quick brown fox jumps over the lazy dog')) * if (r !== vec(256n)(0xf7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8n)) { throw r } * ``` + * + * @import { Vec, Reduce } from '../../types/bit_vec/types.ts' + * @import { Sha2 } from '../sha2/types.ts' */ -/** @import { Vec, Reduce } from '../../types/bit_vec/types.ts' */ import { length, msb, vec, vec8, repeat } from '../../types/bit_vec/module.f.mjs' -/** @import { Sha2 } from '../sha2/types.ts' */ import { computeSync } from '../sha2/module.f.mjs' const { concat, xor } = msb diff --git a/fjs/crypto/pow/module.f.mjs b/fjs/crypto/pow/module.f.mjs index 690c7709da..1e72911d2d 100644 --- a/fjs/crypto/pow/module.f.mjs +++ b/fjs/crypto/pow/module.f.mjs @@ -3,15 +3,16 @@ * hash-vs-target verification using an injected SHA-2 hash. * * @module + * + * @import { Vec } from '../../types/bit_vec/types.ts' + * @import { Nullable } from '../../types/nullable/types.ts' + * @import { Sha2 } from '../sha2/types.ts' + * @import { Pow } from './types.ts' */ import { mask } from '../../types/bigint/module.f.mjs' import { uint } from '../../types/bit_vec/module.f.mjs' -/** @import { Vec } from '../../types/bit_vec/types.ts' */ -/** @import { Nullable } from '../../types/nullable/types.ts' */ import { computeSync, sha256 } from '../sha2/module.f.mjs' -/** @import { Sha2 } from '../sha2/types.ts' */ -/** @import { Pow } from './types.ts' */ const nBitsMantissa = mask(24n) const mantissaSign = 0x00800000n diff --git a/fjs/crypto/secp/module.f.mjs b/fjs/crypto/secp/module.f.mjs index c28fee3a21..b6dae390b7 100644 --- a/fjs/crypto/secp/module.f.mjs +++ b/fjs/crypto/secp/module.f.mjs @@ -4,12 +4,13 @@ * `secp`-family curve from its `(p, a, g, n)` parameters. * * @module + * + * @import { Equal, Reduce } from '../../types/function/operator/types.ts' + * @import { Curve, Init, Point } from './types.ts' */ -/** @import { Equal, Fold, Reduce } from '../../types/function/operator/types.ts' */ import { prime_field, sqrt } from '../../types/prime_field/module.f.mjs' import { repeat } from '../../common/monoid/module.f.mjs' -/** @import { Curve, Init, Point, Point2D } from './types.ts' */ /** * Constructs an elliptic curve with the given initialization parameters. diff --git a/fjs/crypto/secp/proof.f.mjs b/fjs/crypto/secp/proof.f.mjs index 22ca728c17..9ed6b9d918 100644 --- a/fjs/crypto/secp/proof.f.mjs +++ b/fjs/crypto/secp/proof.f.mjs @@ -1,7 +1,8 @@ +/** @import { Point, Curve, Init } from './types.ts' */ + import { assert, assertEq, assertNotNullish } from '../../asserts/module.f.mjs' import { prime_field } from '../../types/prime_field/module.f.mjs' import { curve, secp256k1, secp192r1, secp256r1, eq, secp384r1, secp521r1 } from './module.f.mjs' -/** @import { Point, Curve, Init } from './types.ts' */ /** @type {(param: Curve) => () => void} */ const poker = param => () => { diff --git a/fjs/crypto/sha2/module.f.mjs b/fjs/crypto/sha2/module.f.mjs index f8145ecb03..5bd10f0eed 100644 --- a/fjs/crypto/sha2/module.f.mjs +++ b/fjs/crypto/sha2/module.f.mjs @@ -2,11 +2,16 @@ * See https://www.rfc-editor.org/rfc/rfc6234 * * @module + * + * @import { Tuple } from '../../types/array/types.ts' + * @import { Reduce } from '../../types/bigint/types.ts' + * @import { Vec } from '../../types/bit_vec/types.ts' + * @import { Fold } from '../../types/function/operator/types.ts' + * @import { List } from '../../types/list/types.ts' + * @import { Base, Sha2, State, V16, V8 } from './types.ts' */ -/** @import { Tuple } from '../../types/array/types.ts' */ import { mask } from '../../types/bigint/module.f.mjs' -/** @import { Reduce } from '../../types/bigint/types.ts' */ import { vec, length, @@ -15,11 +20,7 @@ import { chunkList, uint, } from '../../types/bit_vec/module.f.mjs' -/** @import { Vec } from '../../types/bit_vec/types.ts' */ -/** @import { Fold } from '../../types/function/operator/types.ts' */ import { fold } from '../../types/list/module.f.mjs' -/** @import { List } from '../../types/list/types.ts' */ -/** @import { Base, Sha2, State, V16, V8 } from './types.ts' */ const { concat, front } = msb diff --git a/fjs/crypto/sha2/proof.f.ts b/fjs/crypto/sha2/proof.f.ts index d6d929a0f3..b2e3785226 100644 --- a/fjs/crypto/sha2/proof.f.ts +++ b/fjs/crypto/sha2/proof.f.ts @@ -1,9 +1,10 @@ +import type { Sha2 } from './types.ts' + import { utf8 } from '../../text/module.f.mjs' import { repeat, uint, vec } from '../../types/bit_vec/module.f.mjs' import { flip } from '../../types/function/module.f.mjs' import { assertEq } from '../../asserts/module.f.mjs' import { map } from '../../types/list/module.f.mjs' -import type { Sha2 } from './types.ts' import { base32, base64, computeSync, sha224, sha256, sha384, sha512, sha512x224, sha512x256 } from './module.f.mjs' const checkEmpty = ({ init, end, hashLength }: Sha2) => (x: bigint) => { diff --git a/fjs/crypto/sign/module.f.mjs b/fjs/crypto/sign/module.f.mjs index c95662da43..7672019378 100644 --- a/fjs/crypto/sign/module.f.mjs +++ b/fjs/crypto/sign/module.f.mjs @@ -3,17 +3,19 @@ * for the `All` type. * * @module + * + * @import { Tuple } from '../../types/array/types.ts' + * @import { Vec } from '../../types/bit_vec/types.ts' + * @import { Curve } from '../secp/types.ts' + * @import { Sha2 } from '../sha2/types.ts' + * @import { All } from './types.ts' */ + import { assertNotNullish } from '../../asserts/module.f.mjs' -/** @import { Tuple } from '../../types/array/types.ts' */ import { bitLength, divUp8, roundUp8 } from '../../types/bigint/module.f.mjs' -/** @import { Vec } from '../../types/bit_vec/types.ts' */ import { empty, length, msb, repeat, unpack, vec, vec8 } from '../../types/bit_vec/module.f.mjs' import { hmac } from '../hmac/module.f.mjs' -/** @import { Curve } from '../secp/types.ts' */ -/** @import { Sha2 } from '../sha2/types.ts' */ import { computeSync } from '../sha2/module.f.mjs' -/** @import { All } from './types.ts' */ /** * Builds RFC6979 helper conversions for a subgroup order. diff --git a/fjs/crypto/sign/proof.f.mjs b/fjs/crypto/sign/proof.f.mjs index 620421d665..5a1f25c913 100644 --- a/fjs/crypto/sign/proof.f.mjs +++ b/fjs/crypto/sign/proof.f.mjs @@ -1,13 +1,16 @@ -import { utf8 } from "../../text/module.f.mjs" -/** @import { Tuple } from "../../types/array/types.ts" */ -/** @import { Vec } from "../../types/bit_vec/types.ts" */ -import { empty, msb, repeat, vec, vec8 } from "../../types/bit_vec/module.f.mjs" -import { hmac } from "../hmac/module.f.mjs" -/** @import { Curve } from "../secp/types.ts" */ -import { secp192r1, secp256r1, secp384r1, secp521r1 } from "../secp/module.f.mjs" -/** @import { Sha2 } from "../sha2/types.ts" */ -import { computeSync, sha224, sha256, sha384, sha512 } from "../sha2/module.f.mjs" -import { all, concat, computeK, fromCurve, sign } from "./module.f.mjs" +/** + * @import { Tuple } from '../../types/array/types.ts' + * @import { Vec } from '../../types/bit_vec/types.ts' + * @import { Curve } from '../secp/types.ts' + * @import { Sha2 } from '../sha2/types.ts' + */ + +import { utf8 } from '../../text/module.f.mjs' +import { empty, msb, repeat, vec, vec8 } from '../../types/bit_vec/module.f.mjs' +import { hmac } from '../hmac/module.f.mjs' +import { secp192r1, secp256r1, secp384r1, secp521r1 } from '../secp/module.f.mjs' +import { computeSync, sha224, sha256, sha384, sha512 } from '../sha2/module.f.mjs' +import { all, concat, computeK, fromCurve, sign } from './module.f.mjs' import { assertEq } from '../../asserts/module.f.mjs' const sample = utf8("sample")