Results for “effect”

30 results, best first

  1. definitionReference › Glossary effect Something a function does to the world outside the program: reading a file (fs), using the network (net), reading the clock (time). A function lists its effects after uses, so its first line tells…
  2. The language › Effects Effects bound a whole project A project's raft.toml lists the effects its code may use: [package] name = "weather" version = "0.1.0" effects = ["net"] The compiler rejects any uses outside that list (E0413), and raft refuses to…
  3. The language Effects A function that touches the outside world says so in its signature. A function that doesn't say so is pure: its result depends only on its arguments, and the compiler enforces that. fn…
  4. The language › Effects The effects effect allows core module fs reading and writing files and directories fs net sockets, TLS, listening net time the clock and sleeping time rand random numbers rand env environment variables,…
  5. Tools › raft, the package manager Effects are checked on every edge Each package's effects must be a subset of the effects of the package that depends on it. A dependency can therefore never do more than its parent allows, and your project's own list bounds the whole…
  6. Reference › Cheat sheet Effects A function touching the outside world declares it: uses fs, net, time, rand, env, proc, audio_out, gui, ffi. Without uses it is pure; print is always allowed.
  7. error codeError codes E0036: extern in a package without the ffi effect …a package (or project) whose raft.toml declares the ffi effect may do it, and every caller of an extern fn then needs uses ffi too.
  8. error codeError codes E0410: effect used but not declared …net, time, rand, env, proc (or ffi). This is how Auk keeps effects visible: from a signature alone you know whether a function is pure. The note shows the call chain that needs the effect.
  9. error codeError codes E0411: effect declared but not used A warning: the function declares an effect it never uses. Declaring only what a function needs keeps callers and the package's raft.toml accurate. It doesn't fail auk check; the fix removes the…
  10. error codeError codes E0412: constant initializer with an effect …the top level) and imprint values are computed without any effects, so their initializers must be pure. Reading files, the clock or randomness happens in a function that declares the effect.
  11. error codeError codes E0413: effect not allowed by the package's raft.toml A package's raft.toml lists in [package] effects the most its code may use. A function uses an effect outside that ceiling. This lets you see, and limit, what a package can do before depending on it.
  12. error codeError codes E0414: unknown effect uses takes only the built-in effects: fs, net, time, rand, env, proc, audio_out, gui and ffi. This name isn't one of them; the message may suggest the one you meant.
  13. error codeError codes E0415: conversion to any Shape exceeds the shape method's effects …is called through the shape's methods, which declare what effects they may use. Here the type's method uses more than the shape declares, so calling it through the shape would hide an effect.
  14. Reference › Core library Modules that need an effect
  15. definitionReference › Glossary manifest The raft.toml file at the top of a project. It names the project, lists its dependencies, and lists the effects the whole program may use. More: raft, the package manager.
  16. definitionReference › Glossary pure A function with no effects. Its result depends only on its arguments, and the compiler guarantees it. More: Effects.
  17. Start here › Getting started A project with a dependency …the manifest: [package] name = "weather" version = "0.1.0" effects = [] [deps] effects is the list of things this project, and everything it depends on, may do to the outside world. It starts empty,…
  18. The language › Errors and optionals Panics …long-running programs, supervisors build on this. Next: Effects.
  19. Start here › A tour of Auk 4. The outside world Reading a file is an effect, and functions that have effects declare them: struct Item { name: str, qty: int, price: float } fn parse_item(line: str): Item! { let [name, qty, price] = line.split(",")…
  20. The language › Calling C Setup C can do anything, so calling it is an effect. The package's raft.toml must allow ffi, and libraries other than libc are listed under [link]: [package] name = "cdemo" version = "0.1.0" effects =…
  21. The language › Concurrency Supervisors …have something restart it. The sup package (raft add sup, effect time) provides supervisors: fn serve(port: int): ()! uses net { var l = net.listen("127.0.0.1", port)? loop { var c = l.accept()?…
  22. The language › Modules and packages main …uses fs { ... } // arguments, an exit status, errors and effects An int result is the exit status. An error that reaches the end of main prints error: <message> to stderr and exits with status 1. A…
  23. The language › Tests, contracts and holes Tests …are left out of auk build and auk run. A test may use any effect without declaring it. auk test --trace=json prints, under each failure, the last calls the test made, with arguments and results. See…
  24. Working on Auk Low-level Auk (raw): the dialect the runtime is written in …outside the runtime. Decisions (2026-11-18): gated by an effect, raw, that only the runtime package may declare; catch stays a runtime call, implemented with LLVM's sjlj intrinsics (no unwinding;…
  25. Working on Auk raft: Auk's package manager …Its one unusual feature is that packages declare their effects, and raft refuses to install a package that needs an effect your project hasn't allowed. Because of that, a project's raft.toml tells…
  26. Reference Package catalog …add <name>. Each has a README.md with its full API. The "effects" column is the most a package can do. A package with none is pure computation: it cannot touch files, the network, the clock or…
  27. Tools Auk with AI coding agents …does most of that work (exhaustive clauses, errors and effects in the types, contracts, no imports). The toolchain adds a machine-readable interface to everything.
  28. Tools raft: the package manager …Its unusual feature is that packages declare their effects, and raft refuses to install one that needs an effect your project hasn't allowed.
  29. error codeError codes › E0036: extern in a package without the ffi effect Wrong [package] name = "app" version = "0.1.0" effects = [] extern fn c_abs(n: int): int = "int abs(int)" fn main() uses ffi { print(c_abs(-3)) }
  30. error codeError codes › E0036: extern in a package without the ffi effect Fixed [package] name = "app" version = "0.1.0" effects = ["ffi"]