View Source Guesswork.Ast.OneOf (Guesswork v0.5.0)

Binds a value to an Enumerable of possible values.

Note that, when created, the bound value should always be a variable. However, in the process of substitution it may become a concrete value, in which case, on resolution, the stored value is checked against the stream.

It is invalid for the stream to produce a variable.

Summary

Types

@type t() :: %Guesswork.Ast.OneOf{
  binding: Guesswork.Ast.Variable.t() | Guesswork.Ast.Term.entity(),
  values: Enumerable.t()
}

Functions