From ec5a2da88fff9b2b7ebbcb0f7b67af5d803db398 Mon Sep 17 00:00:00 2001 From: Jessie Mongeon Date: Fri, 12 Jul 2024 09:50:56 -0500 Subject: [PATCH 1/3] fix links --- doc/md/base/ExperimentalInternetComputer.md | 2 +- doc/md/writing-motoko/arguments.md | 2 +- test/perf/assetstorage/ExperimentalInternetComputer.mo | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/md/base/ExperimentalInternetComputer.md b/doc/md/base/ExperimentalInternetComputer.md index e9b220b0529..1a5f511d7bf 100644 --- a/doc/md/base/ExperimentalInternetComputer.md +++ b/doc/md/base/ExperimentalInternetComputer.md @@ -30,7 +30,7 @@ let rawReply = await IC.call(ledger, method, to_candid(input)); // serialized Ca let output : ?OutputType = from_candid(rawReply); // { decimals = 8 } ``` -[Learn more about Candid serialization](https://internetcomputer.org/docs/current/developer-docs/build/cdks/motoko-dfinity/language-manual#candid-serialization) +[Learn more about Candid serialization](https://internetcomputer.org/docs/current/motoko/main/reference/language-manual#candid-serialization) ## Function `countInstructions` ``` motoko no-repl diff --git a/doc/md/writing-motoko/arguments.md b/doc/md/writing-motoko/arguments.md index 2ceaf453e2e..0d3b5c177ef 100644 --- a/doc/md/writing-motoko/arguments.md +++ b/doc/md/writing-motoko/arguments.md @@ -60,4 +60,4 @@ Call the `location` method in the program and pass your `city` argument using th dfx canister call favorite_cities location '(vec {"San Francisco";"Paris";"Rome"})' ``` -The command uses the Candid interface description syntax `(vec { val1; val2; val3; })` to return a vector of values. For more information about the Candid interface description language, see the [Candid](/docs/current/developer-docs/smart-contracts/candid/index) language guide. +The command uses the Candid interface description syntax `(vec { val1; val2; val3; })` to return a vector of values. For more information about the Candid interface description language, see the [Candid](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/candid/candid-concepts) language guide. diff --git a/test/perf/assetstorage/ExperimentalInternetComputer.mo b/test/perf/assetstorage/ExperimentalInternetComputer.mo index af441e079c4..9e19f13ac8b 100644 --- a/test/perf/assetstorage/ExperimentalInternetComputer.mo +++ b/test/perf/assetstorage/ExperimentalInternetComputer.mo @@ -28,7 +28,7 @@ module { /// let output : ?OutputType = from_candid(rawReply); // { decimals = 8 } /// ``` /// - /// [Learn more about Candid serialization](https://internetcomputer.org/docs/current/developer-docs/build/cdks/motoko-dfinity/language-manual#candid-serialization) + /// [Learn more about Candid serialization](https://internetcomputer.org/docs/current/motoko/main/reference/language-manual#candid-serialization) public let call : (canister : Principal, name : Text, data : Blob) -> async (reply : Blob) = Prim.call_raw; /// Given computation, `comp`, counts the number of actual and (for IC system calls) notional WebAssembly From 3ef108f045b59db8524820c4559237aba6bbdab5 Mon Sep 17 00:00:00 2001 From: Jessie Mongeon Date: Tue, 30 Jul 2024 12:59:49 -0500 Subject: [PATCH 2/3] add footer image --- doc/md/canister-maintenance/compatibility.md | 4 +++- doc/md/canister-maintenance/cycles.md | 3 +++ doc/md/canister-maintenance/optimization.md | 3 +++ doc/md/canister-maintenance/upgrades.md | 2 ++ doc/md/getting-started/basic-concepts.md | 2 ++ doc/md/getting-started/dev-env.md | 2 ++ doc/md/getting-started/examples.md | 2 ++ doc/md/getting-started/motoko-introduction.md | 2 ++ doc/md/getting-started/quickstart.md | 2 ++ doc/md/migration-guides/0.11.0-migration-guide.md | 4 +++- doc/md/migration-guides/overview.md | 4 +++- doc/md/motoko-packages/cryptography.md | 4 +++- doc/md/motoko-packages/data-structures.md | 3 +++ doc/md/motoko-packages/databases.md | 2 ++ doc/md/motoko-packages/encoding.md | 4 +++- doc/md/motoko-packages/http.md | 4 +++- doc/md/motoko-packages/icrc.md | 4 +++- doc/md/motoko-packages/types-interfaces.md | 1 + doc/md/motoko-packages/utilities.md | 1 + doc/md/motoko-tools/embed-motoko.md | 1 + doc/md/motoko-tools/mo-dev.md | 3 +++ doc/md/motoko-tools/motoko-formatter.md | 2 ++ doc/md/motoko-tools/motoko-js.md | 3 +++ doc/md/reference/compiler-ref.md | 3 +++ doc/md/reference/error-codes.md | 5 ++++- doc/md/reference/generating-docs.md | 4 +++- doc/md/reference/language-manual.md | 3 +++ doc/md/reference/motoko-grammar.md | 3 +++ doc/md/reference/style.md | 2 ++ doc/md/stable-memory/stable-regions.md | 4 +++- doc/md/stable-memory/stablememory.md | 2 ++ doc/md/writing-motoko/actor-classes.md | 1 + doc/md/writing-motoko/actors-async.md | 2 ++ doc/md/writing-motoko/arguments.md | 2 ++ doc/md/writing-motoko/async-data.md | 1 + doc/md/writing-motoko/caller-id.md | 2 ++ doc/md/writing-motoko/candid-ui.md | 2 ++ doc/md/writing-motoko/control-flow.md | 2 ++ doc/md/writing-motoko/errors.md | 2 ++ doc/md/writing-motoko/heartbeats.md | 2 ++ doc/md/writing-motoko/incomplete-code.md | 4 +++- doc/md/writing-motoko/integers.md | 1 + doc/md/writing-motoko/intercanister-calls.md | 2 ++ doc/md/writing-motoko/local-objects-classes.md | 2 ++ doc/md/writing-motoko/message-inspection.md | 4 +++- doc/md/writing-motoko/message-restrictions.md | 4 +++- doc/md/writing-motoko/modules-and-imports.md | 2 ++ doc/md/writing-motoko/mutable-state.md | 2 ++ doc/md/writing-motoko/object-subtyping.md | 4 +++- doc/md/writing-motoko/pattern-matching.md | 4 +++- doc/md/writing-motoko/pipes.md | 1 + doc/md/writing-motoko/query-functions.md | 2 ++ doc/md/writing-motoko/randomness.md | 4 +++- doc/md/writing-motoko/sharing.md | 2 ++ doc/md/writing-motoko/static-types.md | 3 +++ doc/md/writing-motoko/structural-equality.md | 2 ++ doc/md/writing-motoko/system-capability.md | 1 + doc/md/writing-motoko/timers.md | 2 ++ doc/md/writing-motoko/writing-intro.md | 2 ++ 59 files changed, 136 insertions(+), 16 deletions(-) diff --git a/doc/md/canister-maintenance/compatibility.md b/doc/md/canister-maintenance/compatibility.md index c835d528fd4..b05fd92739e 100644 --- a/doc/md/canister-maintenance/compatibility.md +++ b/doc/md/canister-maintenance/compatibility.md @@ -184,4 +184,6 @@ Motoko embeds `.did` and `.most` files as Wasm custom sections for use by other ``` let msg = format!("Candid interface compatibility check failed for canister '{}'.\nYou are making a BREAKING change. Other canisters or frontend clients relying on your canister may stop working.\n\n", canister_info.get_name()) + &err; -``` \ No newline at end of file +``` + +Logo diff --git a/doc/md/canister-maintenance/cycles.md b/doc/md/canister-maintenance/cycles.md index 1218d7ee34f..1c05399b116 100644 --- a/doc/md/canister-maintenance/cycles.md +++ b/doc/md/canister-maintenance/cycles.md @@ -106,3 +106,6 @@ For this example, Alice is using her readily available cycles that she already o Because `porky` consumes cycles in its operation, it is possible for `porky` to spend some or even all of Alice’s cycle savings before she has a chance to retrieve them. ::: + +Logo + diff --git a/doc/md/canister-maintenance/optimization.md b/doc/md/canister-maintenance/optimization.md index 739eb6eb1c3..f92d08939f0 100644 --- a/doc/md/canister-maintenance/optimization.md +++ b/doc/md/canister-maintenance/optimization.md @@ -59,3 +59,6 @@ Note that in certain cases the optimizations can increase the complexity of cert ::: More information on canister optimization and information on `wasm-opt` benchmark testing can be found [on this forum post](https://forum.dfinity.org/t/canister-optimizer-available-in-dfx-0-14-0/21157). + + +Logo diff --git a/doc/md/canister-maintenance/upgrades.md b/doc/md/canister-maintenance/upgrades.md index 9efe8cdb078..340cada8d1a 100644 --- a/doc/md/canister-maintenance/upgrades.md +++ b/doc/md/canister-maintenance/upgrades.md @@ -198,3 +198,5 @@ After you have deployed a Motoko actor with the appropriate `stable` variables o ``` let msg = format!("Candid interface compatibility check failed for canister '{}'.\nYou are making a BREAKING change. Other canisters or frontend clients relying on your canister may stop working.\n\n", canister_info.get_name()) + &err; ``` + +Logo diff --git a/doc/md/getting-started/basic-concepts.md b/doc/md/getting-started/basic-concepts.md index 5ef7c83e2a1..83d03be659f 100644 --- a/doc/md/getting-started/basic-concepts.md +++ b/doc/md/getting-started/basic-concepts.md @@ -205,3 +205,5 @@ assert n % 2 == 0; // traps when n not even ``` Because an assertion may succeed, and thus proceed with execution, it may only be used in context where a value of type `()` is expected. + +Logo diff --git a/doc/md/getting-started/dev-env.md b/doc/md/getting-started/dev-env.md index 7e23ba8f479..e732879fd1e 100644 --- a/doc/md/getting-started/dev-env.md +++ b/doc/md/getting-started/dev-env.md @@ -142,3 +142,5 @@ Here is an example `dfx.json` canister configuration that uses `args`: } ... ``` + +Logo diff --git a/doc/md/getting-started/examples.md b/doc/md/getting-started/examples.md index 11e8df8880d..242e04b5461 100644 --- a/doc/md/getting-started/examples.md +++ b/doc/md/getting-started/examples.md @@ -108,3 +108,5 @@ Want to get started building with Motoko? Check out some of these sample project - [Motoko book](https://github.com/Web3NL/motoko-book): An educational book on Motoko. - [Motoko Bootcamp](https://github.com/motoko-bootcamp/education): Lessons and lectures on Motoko development. + +Logo diff --git a/doc/md/getting-started/motoko-introduction.md b/doc/md/getting-started/motoko-introduction.md index b221ed1b84a..b2dd2f28a69 100644 --- a/doc/md/getting-started/motoko-introduction.md +++ b/doc/md/getting-started/motoko-introduction.md @@ -94,3 +94,5 @@ For scenarios that can’t be solved using stable variables alone, Motoko provid ## Getting started Get started with Motoko by [setting up your developer environment](dev-env.md) and creating a simple [Hello, world!](quickstart.md) program. + +Logo diff --git a/doc/md/getting-started/quickstart.md b/doc/md/getting-started/quickstart.md index 56bc0919dc4..cfd139db563 100644 --- a/doc/md/getting-started/quickstart.md +++ b/doc/md/getting-started/quickstart.md @@ -104,3 +104,5 @@ Frontend canister via browser Backend canister via Candid interface: access_hello_backend: http://127.0.0.1:4943/?canisterId=cbopz-duaaa-aaaaa-qaaka-cai&id=ctiya-peaaa-aaaaa-qaaja-cai ``` + +Logo diff --git a/doc/md/migration-guides/0.11.0-migration-guide.md b/doc/md/migration-guides/0.11.0-migration-guide.md index 31949dfe35a..c3fe6f9c26a 100644 --- a/doc/md/migration-guides/0.11.0-migration-guide.md +++ b/doc/md/migration-guides/0.11.0-migration-guide.md @@ -80,4 +80,6 @@ System capability is available within the following contexts: - Within the body of a local (i.e. not `shared`) function or class that is declared with `system` pseudo-type parameter. - Within the system functions `preupgrade` and `postupgrade`. -No other context provides system capabilities, including the bodies of query and composite query methods. \ No newline at end of file +No other context provides system capabilities, including the bodies of query and composite query methods. + +Logo diff --git a/doc/md/migration-guides/overview.md b/doc/md/migration-guides/overview.md index 23661ea8d48..a11f4211582 100644 --- a/doc/md/migration-guides/overview.md +++ b/doc/md/migration-guides/overview.md @@ -8,4 +8,6 @@ New versions of Motoko may introduce breaking changes that are not backwards com ## Migration guides -- [0.11.0 Migration guide](0.11.0-migration-guide.md) \ No newline at end of file +- [0.11.0 Migration guide](0.11.0-migration-guide.md) + +Logo diff --git a/doc/md/motoko-packages/cryptography.md b/doc/md/motoko-packages/cryptography.md index 2fa381ea8ef..76cb46eb7e4 100644 --- a/doc/md/motoko-packages/cryptography.md +++ b/doc/md/motoko-packages/cryptography.md @@ -20,4 +20,6 @@ sidebar_position: 1 - [`sha2`](https://mops.one/sha2): An optimized implementation of all SHA2 functions. -- [`sha3`](https://mops.one/sha3): A Motoko SHA3/Keccak library. \ No newline at end of file +- [`sha3`](https://mops.one/sha3): A Motoko SHA3/Keccak library. + +Logo diff --git a/doc/md/motoko-packages/data-structures.md b/doc/md/motoko-packages/data-structures.md index 9fdb6daa5c6..6412691165d 100644 --- a/doc/md/motoko-packages/data-structures.md +++ b/doc/md/motoko-packages/data-structures.md @@ -45,3 +45,6 @@ sidebar_position: 2 - [`swbstable`](https://mops.one/swbstable): Stable sliding window buffer with random access. - [`vector`](https://mops.one/vector): Memory-efficient resizable array. Can be used as a replacement for `Buffer`. + + +Logo diff --git a/doc/md/motoko-packages/databases.md b/doc/md/motoko-packages/databases.md index cbdb3c5b92e..4765d9b4b7a 100644 --- a/doc/md/motoko-packages/databases.md +++ b/doc/md/motoko-packages/databases.md @@ -19,3 +19,5 @@ sidebar_position: 3 - [`nacdb-reorder`](https://mops.one/nacdb-reorder): Re-orderable lists in NacDB database. - [`rxmodb`](https://mops.one/rxmodb): Motoko databases using `Vector` for main storage and `BTree` for indexes. + +Logo diff --git a/doc/md/motoko-packages/encoding.md b/doc/md/motoko-packages/encoding.md index 5aafb72bccd..1e4c74af311 100644 --- a/doc/md/motoko-packages/encoding.md +++ b/doc/md/motoko-packages/encoding.md @@ -22,4 +22,6 @@ sidebar_position: 4 - [`serde`](https://mops.one/serde): Serialization and deserialization. -- [`xml`](https://mops.one/xml): Encode and decode XML. \ No newline at end of file +- [`xml`](https://mops.one/xml): Encode and decode XML. + +Logo diff --git a/doc/md/motoko-packages/http.md b/doc/md/motoko-packages/http.md index 2bfdd928886..cfba5a713bb 100644 --- a/doc/md/motoko-packages/http.md +++ b/doc/md/motoko-packages/http.md @@ -32,4 +32,6 @@ sidebar_position: 5 - [`server`](https://mops.one/server): A server for Motoko similar to Express. -- [`web-api`](https://mops.one/web-api) and [`web-io`](https://mops.one/web-io): Create HTTP requests and handle responses. \ No newline at end of file +- [`web-api`](https://mops.one/web-api) and [`web-io`](https://mops.one/web-io): Create HTTP requests and handle responses. + +Logo diff --git a/doc/md/motoko-packages/icrc.md b/doc/md/motoko-packages/icrc.md index ba20c268fe2..a38de58342c 100644 --- a/doc/md/motoko-packages/icrc.md +++ b/doc/md/motoko-packages/icrc.md @@ -38,4 +38,6 @@ sidebar_position: 5 - [`icrc-nft-mo`](https://mops.one/icrc-nft-mo): An ICRC NFT library. -- [`origyn-nft`](https://mops.one/origyn-nft): The reference implementation for the ORIGYN NFT. \ No newline at end of file +- [`origyn-nft`](https://mops.one/origyn-nft): The reference implementation for the ORIGYN NFT. + +Logo diff --git a/doc/md/motoko-packages/types-interfaces.md b/doc/md/motoko-packages/types-interfaces.md index 96dd4da1280..77da7546296 100644 --- a/doc/md/motoko-packages/types-interfaces.md +++ b/doc/md/motoko-packages/types-interfaces.md @@ -35,5 +35,6 @@ sidebar_position: 6 - [`xrc-types`](https://mops.one/xrc-types): Exchange rate canister interface. +Logo diff --git a/doc/md/motoko-packages/utilities.md b/doc/md/motoko-packages/utilities.md index ed3c6bb3006..86074acbef5 100644 --- a/doc/md/motoko-packages/utilities.md +++ b/doc/md/motoko-packages/utilities.md @@ -57,3 +57,4 @@ sidebar_position: 7 - [`xtended-text`](https://mops.one/xtended-text): Text manipulation. +Logo diff --git a/doc/md/motoko-tools/embed-motoko.md b/doc/md/motoko-tools/embed-motoko.md index 32dbb19e7b2..872886fdb3a 100644 --- a/doc/md/motoko-tools/embed-motoko.md +++ b/doc/md/motoko-tools/embed-motoko.md @@ -42,3 +42,4 @@ The console output on the page will confirm that the iframe code has been copied +Logo diff --git a/doc/md/motoko-tools/mo-dev.md b/doc/md/motoko-tools/mo-dev.md index 2b9c853a00b..d9084dbbf2d 100644 --- a/doc/md/motoko-tools/mo-dev.md +++ b/doc/md/motoko-tools/mo-dev.md @@ -94,3 +94,6 @@ The [Vite + React + Motoko](https://github.com/rvanasa/vite-react-motoko#readme) ## Important notes `mo-dev` is early in development. Please feel free to report a bug, ask a question, or request a feature on the project's [GitHub issues](https://github.com/dfinity/motoko-dev-server/issues) page. + + +Logo diff --git a/doc/md/motoko-tools/motoko-formatter.md b/doc/md/motoko-tools/motoko-formatter.md index 6014b27393b..9ccb5cd6e03 100644 --- a/doc/md/motoko-tools/motoko-formatter.md +++ b/doc/md/motoko-tools/motoko-formatter.md @@ -79,3 +79,5 @@ mo-fmt -c **/* - [Motoko extension for VS Code](https://marketplace.visualstudio.com/items?itemName=dfinity-foundation.vscode-motoko) - [`mo-fmt`](https://www.npmjs.com/package/mo-fmt) + +Logo diff --git a/doc/md/motoko-tools/motoko-js.md b/doc/md/motoko-tools/motoko-js.md index 123374e162c..64d20d547f7 100644 --- a/doc/md/motoko-tools/motoko-js.md +++ b/doc/md/motoko-tools/motoko-js.md @@ -88,3 +88,6 @@ service : { - [Top level API](https://github.com/dfinity/node-motoko?tab=readme-ov-file#top-level-api) - [File API](https://github.com/dfinity/node-motoko?tab=readme-ov-file#file-api) + + +Logo diff --git a/doc/md/reference/compiler-ref.md b/doc/md/reference/compiler-ref.md index 0d52c1d9c38..3e28b403681 100644 --- a/doc/md/reference/compiler-ref.md +++ b/doc/md/reference/compiler-ref.md @@ -68,3 +68,6 @@ You can use the following options with the `moc` command. | `-v` | Generates verbose output. | `--version` | Displays version information. | | `-wasi-system-api` | Uses the WASI system API (`wasmtime`). | + + +Logo diff --git a/doc/md/reference/error-codes.md b/doc/md/reference/error-codes.md index 14d7a4b5ff3..963ec94fecf 100644 --- a/doc/md/reference/error-codes.md +++ b/doc/md/reference/error-codes.md @@ -54,4 +54,7 @@ sidebar_position: 6 | M0194 | An identifier was defined without referencing it later. | | M0195 | A function that demands elevated (system) capabilities was called without manifestly passing the capability. | | M0197 | A function that requires (system) capabilities was called in a context that does not provide them. | -| M0198 | A field identifier was specified in an object pattern without referencing this identifier later. | \ No newline at end of file +| M0198 | A field identifier was specified in an object pattern without referencing this identifier later. | + + +Logo \ No newline at end of file diff --git a/doc/md/reference/generating-docs.md b/doc/md/reference/generating-docs.md index 0aff125e1d0..f59686778d1 100644 --- a/doc/md/reference/generating-docs.md +++ b/doc/md/reference/generating-docs.md @@ -73,4 +73,6 @@ func factorial(n : Nat) : ?Nat { ## Resources Check out Motoko's [base library source code](https://github.com/dfinity/motoko-base/tree/master/src) for additional examples and best practices. -The source code for `mo-doc` is available in the [dfinity/motoko](https://github.com/dfinity/motoko/tree/master/src/docs) GitHub repository. Contributions are welcome! \ No newline at end of file +The source code for `mo-doc` is available in the [dfinity/motoko](https://github.com/dfinity/motoko/tree/master/src/docs) GitHub repository. Contributions are welcome! + +Logo \ No newline at end of file diff --git a/doc/md/reference/language-manual.md b/doc/md/reference/language-manual.md index 9662e81e2db..6467ed8a703 100644 --- a/doc/md/reference/language-manual.md +++ b/doc/md/reference/language-manual.md @@ -2694,3 +2694,6 @@ In general, this means that an expression of a more specific type may appear whe ## References - **IEEE Standard for Floating-Point Arithmetic**, in IEEE Std 754-2019 (Revision of IEEE 754-2008), vol., no., pp.1-84, 22 July 2019, doi: 10.1109/IEEESTD.2019.8766229. + + +Logo \ No newline at end of file diff --git a/doc/md/reference/motoko-grammar.md b/doc/md/reference/motoko-grammar.md index d6786325d5f..b2c8908fe9f 100644 --- a/doc/md/reference/motoko-grammar.md +++ b/doc/md/reference/motoko-grammar.md @@ -8,3 +8,6 @@ This section describes the concrete syntax, or grammar, of Motoko. The specifica ``` bnf file=../examples/grammar.txt ``` + + +Logo \ No newline at end of file diff --git a/doc/md/reference/style.md b/doc/md/reference/style.md index 12b9ac169e2..38ec8a46a10 100644 --- a/doc/md/reference/style.md +++ b/doc/md/reference/style.md @@ -896,3 +896,5 @@ Rationale: `g[1]` in particular will be misparsed as an indexing operation. + +Logo \ No newline at end of file diff --git a/doc/md/stable-memory/stable-regions.md b/doc/md/stable-memory/stable-regions.md index a382e2310c5..85850008559 100644 --- a/doc/md/stable-memory/stable-regions.md +++ b/doc/md/stable-memory/stable-regions.md @@ -102,4 +102,6 @@ The shared `get(index)` query reads anywhere from the log without traversing any - [`stable-enum`](https://mops.one/stable-enum): Enumerations implemented in stable regions. -- [`stable-buffer`](https://mops.one/stable-buffer): Buffers implemented in stable regions. \ No newline at end of file +- [`stable-buffer`](https://mops.one/stable-buffer): Buffers implemented in stable regions. + +Logo \ No newline at end of file diff --git a/doc/md/stable-memory/stablememory.md b/doc/md/stable-memory/stablememory.md index 169f67506b5..fb2716bee12 100644 --- a/doc/md/stable-memory/stablememory.md +++ b/doc/md/stable-memory/stablememory.md @@ -31,3 +31,5 @@ New applications should use the `Region` library: it offers additional isolation - [motoko-dht](https://github.com/enzoh/motoko-dht): A distributed hash table sample. - [motoko-document-db](https://github.com/DepartureLabsIC/motoko-document-db): A document database sample. + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/actor-classes.md b/doc/md/writing-motoko/actor-classes.md index 151fd0a0d9b..ab421ab1d09 100644 --- a/doc/md/writing-motoko/actor-classes.md +++ b/doc/md/writing-motoko/actor-classes.md @@ -84,3 +84,4 @@ lower-level facilities of the Internet Computer. See [actor class management](../reference/language-manual#actor-class-management) for more details. +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/actors-async.md b/doc/md/writing-motoko/actors-async.md index ac93a6e1cbc..26bde5931ad 100644 --- a/doc/md/writing-motoko/actors-async.md +++ b/doc/md/writing-motoko/actors-async.md @@ -151,3 +151,5 @@ Consider the following stateful `Atomicity` actor: Calling the shared function `atomic()` will fail with an error, since the last statement causes a trap. However, the trap leaves the mutable variable `s` with value `0`, not `1`, and variable `pinged` with value `false`, not `true`. This is because the trap happens before the method `atomic` has executed an `await`, or exited with a result. Even though `atomic` calls `ping()`, `ping()` is queued until the next commit point. Calling the shared function `nonAtomic()` will also fail with an error due to a trap. In this function, the trap leaves the variable `s` with value `3`, not `0`, and variable `pinged` with value `true`, not `false`. This is because each `await` commits its preceding side-effects, including message sends. Even though `f` is complete by the second await, this await also forces a commit of the state, suspends execution and allows for interleaved processing of other messages to this actor. + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/arguments.md b/doc/md/writing-motoko/arguments.md index 0d3b5c177ef..1d1fcb27f84 100644 --- a/doc/md/writing-motoko/arguments.md +++ b/doc/md/writing-motoko/arguments.md @@ -61,3 +61,5 @@ dfx canister call favorite_cities location '(vec {"San Francisco";"Paris";"Rome" ``` The command uses the Candid interface description syntax `(vec { val1; val2; val3; })` to return a vector of values. For more information about the Candid interface description language, see the [Candid](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/candid/candid-concepts) language guide. + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/async-data.md b/doc/md/writing-motoko/async-data.md index d9e6cd0efa6..5efb6806f0a 100644 --- a/doc/md/writing-motoko/async-data.md +++ b/doc/md/writing-motoko/async-data.md @@ -94,3 +94,4 @@ Each `await` suspends execution, allowing an interloper to change the state of t - [`star`](https://mops.one/star): Used for handling asynchronous behavior and traps using async* functions. +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/caller-id.md b/doc/md/writing-motoko/caller-id.md index 57ce22fcdf7..effe7876606 100644 --- a/doc/md/writing-motoko/caller-id.md +++ b/doc/md/writing-motoko/caller-id.md @@ -55,3 +55,5 @@ Simple actor declarations do not let you access their installer. If you need acc ::: Principals support equality, ordering, and hashing, so you can efficiently store principals in containers for functions such as maintaining an allow or deny list. More operations on principals are available in the [principal](../base/Principal.md) base library. + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/candid-ui.md b/doc/md/writing-motoko/candid-ui.md index 5ab30ad6207..a318e91cdfe 100644 --- a/doc/md/writing-motoko/candid-ui.md +++ b/doc/md/writing-motoko/candid-ui.md @@ -25,3 +25,5 @@ To learn how to use Candid, check out the documentation here: - [Using Candid](/docs/current/developer-docs/smart-contracts/candid/candid-howto). - [Candid specification](https://github.com/dfinity/candid/blob/master/spec/Candid.md). + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/control-flow.md b/doc/md/writing-motoko/control-flow.md index ae4ca9135c4..db5e0912a6f 100644 --- a/doc/md/writing-motoko/control-flow.md +++ b/doc/md/writing-motoko/control-flow.md @@ -202,3 +202,5 @@ Many built-in data structures come with pre-defined iterators. Below table lists User-defined data structures can define their own iterators. As long they conform with the `Iter` type for some element type `A`, these behave like the built-in ones and can be consumed with ordinary `for`-loops. + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/errors.md b/doc/md/writing-motoko/errors.md index 0b3061b15fb..02a8fe7c6a8 100644 --- a/doc/md/writing-motoko/errors.md +++ b/doc/md/writing-motoko/errors.md @@ -134,3 +134,5 @@ Callsite: ``` motoko no-repl file=../examples/todo-error.mo#L108-L115 ``` + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/heartbeats.md b/doc/md/writing-motoko/heartbeats.md index 61afc5240fe..6c18b406f0b 100644 --- a/doc/md/writing-motoko/heartbeats.md +++ b/doc/md/writing-motoko/heartbeats.md @@ -20,3 +20,5 @@ A simple, contrived example is a recurrent alarm, that sends a message to itself The `heartbeat` function is called on every ICP subnet heartbeat by scheduling an asynchronous call to the `heartbeat` function. Due to its `async` return type, a heartbeat function may send further messages and await results. The result of a heartbeat call, including any trap or thrown error, is ignored. The implicit context switch inherent to calling every Motoko async function means that the time the `heartbeat` body is executed may be later than the time the heartbeat was issued by the subnet. As an `async` function, `Alarm`'s `heartbeat` function is free to call other asynchronous functions, as well as shared functions of other canisters. + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/incomplete-code.md b/doc/md/writing-motoko/incomplete-code.md index 1d8cb9a478d..8736310e91e 100644 --- a/doc/md/writing-motoko/incomplete-code.md +++ b/doc/md/writing-motoko/incomplete-code.md @@ -45,4 +45,6 @@ To document unreachable code, you can use the `unreachable` function from the p P.unreachable() ``` -Like `unreachable()` has type `None` and thus any other type, and will trap on (unexpected!) execution. \ No newline at end of file +Like `unreachable()` has type `None` and thus any other type, and will trap on (unexpected!) execution. + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/integers.md b/doc/md/writing-motoko/integers.md index e2c51db0def..13f71cfcbe9 100644 --- a/doc/md/writing-motoko/integers.md +++ b/doc/md/writing-motoko/integers.md @@ -79,3 +79,4 @@ This program supports the following function calls: - The `clearall` function clears the `cell` value stored as the result of previous operations, resetting the `cell` value to zero. +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/intercanister-calls.md b/doc/md/writing-motoko/intercanister-calls.md index 5129fb1dab1..bde2d8ff3bd 100644 --- a/doc/md/writing-motoko/intercanister-calls.md +++ b/doc/md/writing-motoko/intercanister-calls.md @@ -71,3 +71,5 @@ Then, use the following call, replacing `canisterID` with the principal ID of a ``` dfx canister call canister1 main "canisterID" ``` + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/local-objects-classes.md b/doc/md/writing-motoko/local-objects-classes.md index 4b794a43b27..d3175e3835a 100644 --- a/doc/md/writing-motoko/local-objects-classes.md +++ b/doc/md/writing-motoko/local-objects-classes.md @@ -323,3 +323,5 @@ This syntax provides a convenient way to create modular and reusable code in Mot extend existing objects with new functionality. For more details, see the [language manual](../reference/language-manual#object-combinationextension). + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/message-inspection.md b/doc/md/writing-motoko/message-inspection.md index d17702e4c2c..0ee08a0cb8e 100644 --- a/doc/md/writing-motoko/message-inspection.md +++ b/doc/md/writing-motoko/message-inspection.md @@ -118,4 +118,6 @@ instead of expected type #set : () -> Nat } } -> Bool -``` \ No newline at end of file +``` + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/message-restrictions.md b/doc/md/writing-motoko/message-restrictions.md index a01029aa18d..ad892c1b2a0 100644 --- a/doc/md/writing-motoko/message-restrictions.md +++ b/doc/md/writing-motoko/message-restrictions.md @@ -25,4 +25,6 @@ It is only possible to `throw` or `try/catch` errors in an asynchronous context. These rules also mean that local functions cannot directly call shared functions or `await` futures. -(The same restrictions apply to `await*` and `async*` expressions.) \ No newline at end of file +(The same restrictions apply to `await*` and `async*` expressions.) + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/modules-and-imports.md b/doc/md/writing-motoko/modules-and-imports.md index d87716be0c7..f10175e0cb9 100644 --- a/doc/md/writing-motoko/modules-and-imports.md +++ b/doc/md/writing-motoko/modules-and-imports.md @@ -178,3 +178,5 @@ import List "mo:base/List:"; import Sequence "mo:collections/List"; import L "mo:base/List"; ``` + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/mutable-state.md b/doc/md/writing-motoko/mutable-state.md index 535fda57bd1..2eb513aed15 100644 --- a/doc/md/writing-motoko/mutable-state.md +++ b/doc/md/writing-motoko/mutable-state.md @@ -217,3 +217,5 @@ a Subtyping in Motoko does not permit us to use a mutable array of type `[var Nat]` in places that expect an immutable one of type `[Nat]`. There are two reasons for this. First, as with all mutable state, mutable arrays require different rules for sound subtyping. In particular, mutable arrays have a less flexible subtyping definition, necessarily. Second, Motoko forbids uses of mutable arrays across [asynchronous communication](actors-async.md), where mutable state is never shared. + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/object-subtyping.md b/doc/md/writing-motoko/object-subtyping.md index b39256e95aa..e0370754bea 100644 --- a/doc/md/writing-motoko/object-subtyping.md +++ b/doc/md/writing-motoko/object-subtyping.md @@ -92,4 +92,6 @@ Subtyping relationships in Motoko extend to all types, not just object types. Most cases are standard and follow conventional programming language theory for *structural* subtyping. -Other notable cases in Motoko for new programmers include array, options, variants and number type inter-relationships. \ No newline at end of file +Other notable cases in Motoko for new programmers include array, options, variants and number type inter-relationships. + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/pattern-matching.md b/doc/md/writing-motoko/pattern-matching.md index 17265528ce1..fe697597bff 100644 --- a/doc/md/writing-motoko/pattern-matching.md +++ b/doc/md/writing-motoko/pattern-matching.md @@ -130,4 +130,6 @@ These blocks allow for safe unwrapping of optional values using a postfix `!` op Each use of `!` within the block is equivalent to a switch statement on an option, but with an added benefit: if `!` is applied to a `null` value, the entire block immediately abandons execution and returns `null`. This short-circuiting behavior simplifies the handling of multiple optional values in a more concise and readable manner. -For an example, see [option blocks and null breaks](control-flow#option-blocks-and-null-breaks). \ No newline at end of file +For an example, see [option blocks and null breaks](control-flow#option-blocks-and-null-breaks). + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/pipes.md b/doc/md/writing-motoko/pipes.md index aec2257fb6e..1c0c03886a0 100644 --- a/doc/md/writing-motoko/pipes.md +++ b/doc/md/writing-motoko/pipes.md @@ -42,3 +42,4 @@ Internally, the compiler uses the reserved identifier `_` as the name for the pl See [the language manual page on pipes](../reference/language-manual#pipe-operators-and-placeholder-expressions) for more details. +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/query-functions.md b/doc/md/writing-motoko/query-functions.md index a1f12344463..d59ee7e5c8a 100644 --- a/doc/md/writing-motoko/query-functions.md +++ b/doc/md/writing-motoko/query-functions.md @@ -93,3 +93,5 @@ When `state` is `0`, a call to `test` returns This is because none of the local updates to `state` are visible to any of the callers or callees. ::: + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/randomness.md b/doc/md/writing-motoko/randomness.md index 4efdf3d1157..98ff5c96bc1 100644 --- a/doc/md/writing-motoko/randomness.md +++ b/doc/md/writing-motoko/randomness.md @@ -130,4 +130,6 @@ actor { - [On-chain randomness](https://internetcomputer.org/docs/current/developer-docs/smart-contracts/advanced-features/randomness) -- [Random base library documentation](../base/Random.md) \ No newline at end of file +- [Random base library documentation](../base/Random.md) + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/sharing.md b/doc/md/writing-motoko/sharing.md index 4379f03fd7a..a9826dd5012 100644 --- a/doc/md/writing-motoko/sharing.md +++ b/doc/md/writing-motoko/sharing.md @@ -160,3 +160,5 @@ actor Publisher { }; }; ``` + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/static-types.md b/doc/md/writing-motoko/static-types.md index 709b3f14e2f..08268b84111 100644 --- a/doc/md/writing-motoko/static-types.md +++ b/doc/md/writing-motoko/static-types.md @@ -15,3 +15,6 @@ To execute, Motoko statically compiles to WebAssembly, a portable binary format This is often summarized with the phrase ["well-typed Motoko programs don’t go wrong"](../getting-started/basic-concepts.md#type-soundness), meaning that the only operations that will be performed on data are those permitted by its static type. Dynamic testing can check properties that are beyond the reach of the Motoko type system. The Motoko type system is intentionally not advanced. Rather, the type system of Motoko integrates standard concepts from modern, but well-understood, [type systems](../getting-started/motoko-introduction) to provide an approachable, expressive, yet safe language for programming general-purpose, distributed applications. + + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/structural-equality.md b/doc/md/writing-motoko/structural-equality.md index 5521f3887c0..1c57b277a20 100644 --- a/doc/md/writing-motoko/structural-equality.md +++ b/doc/md/writing-motoko/structural-equality.md @@ -88,3 +88,5 @@ func contains(eqA : (A, A) -> Bool, element : A, list : List.List) : Bool assert(not contains(Nat.equal, 1, ?(0, null))); ``` + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/system-capability.md b/doc/md/writing-motoko/system-capability.md index 4338bd616b5..781065f6f77 100644 --- a/doc/md/writing-motoko/system-capability.md +++ b/doc/md/writing-motoko/system-capability.md @@ -66,3 +66,4 @@ For more details, see the [language manual](../reference/language-manual#type-ar For details on migrating code from earlier Motoko versions, see this [guide](../migration-guides/0.11.0-migration-guide). +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/timers.md b/doc/md/writing-motoko/timers.md index 8a98fe2d509..0c37edd9eb5 100644 --- a/doc/md/writing-motoko/timers.md +++ b/doc/md/writing-motoko/timers.md @@ -34,3 +34,5 @@ system func timer(setGlobalTimer : Nat64 -> ()) : async () { print("Tick!"); } ``` + +Logo \ No newline at end of file diff --git a/doc/md/writing-motoko/writing-intro.md b/doc/md/writing-motoko/writing-intro.md index bc776aca117..0eb836cf9a2 100644 --- a/doc/md/writing-motoko/writing-intro.md +++ b/doc/md/writing-motoko/writing-intro.md @@ -100,3 +100,5 @@ To start writing Motoko code, start by reading the in-depth documentation for so - [Caller identification](caller-id.md) The Motoko programming language continues to evolve with each release of the [IC SDK](https://internetcomputer.org/docs/current/developer-docs/setup/install) and with ongoing updates to the Motoko compiler. Check back regularly to try new features and see what’s changed. + +Logo \ No newline at end of file From 740536aad50420f9960f9cc7b434a00a62fe5c33 Mon Sep 17 00:00:00 2001 From: Jessie Mongeon Date: Tue, 30 Jul 2024 13:47:58 -0500 Subject: [PATCH 3/3] add footer image --- doc/md/reference/compiler-ref.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/md/reference/compiler-ref.md b/doc/md/reference/compiler-ref.md index 3e28b403681..76a90b969ec 100644 --- a/doc/md/reference/compiler-ref.md +++ b/doc/md/reference/compiler-ref.md @@ -70,4 +70,4 @@ You can use the following options with the `moc` command. | `-wasi-system-api` | Uses the WASI system API (`wasmtime`). | -Logo +Logo \ No newline at end of file