View Source Guesswork.Constraint.Arithmetic.Statement (Guesswork v0.8.0)

Stores an aritmmetic statement in a + b = c, a * b = c, or a = c.

Summary

Types

t()

@type t() :: %Guesswork.Constraint.Arithmetic.Statement{
  a: Guesswork.Constraint.Arithmetic.value(),
  b: Guesswork.Constraint.Arithmetic.value() | nil,
  c: Guesswork.Constraint.Arithmetic.value(),
  constraint: Guesswork.Constraint.Comparison.constraint(),
  halt_on_error: boolean(),
  operation: Guesswork.Constraint.Arithmetic.operation() | nil
}

Functions

new(left, constraint, right)

new(a, op, b, constraint \\ :=, c)

put_halt_on_error(statement, halt_on_error)

@spec put_halt_on_error(t(), boolean()) :: t()

simplify(relation)

@spec simplify(t()) :: t() | :ok | :error