Skip to content

[P2] IO.exit, env-var set, and IO.args default handler #27

@ecto

Description

@ecto

The IO effect is missing a few standard operations and one of the
existing ones has a surprising unhandled default.

  • IO.exit — no way to terminate a program with a status code.
  • env-var set[IO.env "X"] reads; there is no setter.
  • IO.args default[IO.args] returns () (Unit) when run
    without a custom handler, which is hard to use. It should fall
    through to the actual process args as #[Str].

Acceptance criteria

  • [IO.exit code], [IO.set-env "K" "V"] declared and listed in
    ref/effects.loon.
  • Default IO.args handler returns the real process arguments.
  • A test program reads [IO.args] under loon run and gets a
    non-empty vector.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions