Skip to content

Determine core function guarantees #1

@YellPika

Description

@YellPika

In order to write correct generators, users need to understand what should be guaranteed by the core operations.

Current status:

  • gen::choose(n)
    • Only returns values <= n
    • For any infinite set of calls, at least one will return 0
      • Satisfied by an exhaustive strategy
      • Almost-certainly satisfied by a random strategy
  • gen::succeed()
    • May not return (this is only a user hint)
  • gen::shrink(n)
    • Only returns values < n
  • gen::label(id)
    • Does nothing by itself (only affects the behavior of other effects)

Once this is worked out these guarantees should be properly documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions