Skip to content

Value.value can't be used in a pure test #5538

Open
@ceedubs

Description

The Value.value builtin can't be used in a test. Is this intended? It doesn't declare the IO ability, but the error message indicates that it is performing IO.

fresh/main> builtins.merge

  Done.
foo : [Test.Result]
foo =
  _ = Value.value 3
  [Result.Ok "passed"]
  Loading changes detected in scratch.u.

  I found and typechecked these definitions in scratch.u. If you
  do an `add` or `update`, here's how your codebase would
  change:

    ⍟ These new definitions are ok to `add`:
    
      foo : [Result]
fresh/main> add

  ⍟ I've added these definitions:

    foo : [Result]
fresh/main> test

🛑

The transcript failed due to an error in the stanza above. The error is:

💔💥

I've encountered a call to builtin.bug with the following value:

  "pure code can't perform I/O"

Stack trace:
  builtin.bug
  #iqsghdla6m

Environment (please complete the following information):

  • ucm --version 0.5.31

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions