Continuum.Pure (continuum v0.8.5)

Copy Markdown View Source

Mark a module as a pure helper that may be called from workflow code.

The Continuum.AstCheck scanner runs over every function in the module as it is defined; non-deterministic calls become compile errors.

defmodule MyApp.PriceMath do
  use Continuum.Pure

  def total(items), do: Enum.reduce(items, 0, & &1.price + &2)
end

Trusted stdlib modules (Enum, Map, String, …) do not need this; see Continuum.AstCheck.trusted_stdlib/0 for the baked-in allowlist.

Static Pure calls in generated workflow entrypoints are pinned to a content-addressed helper implementation, including transitive Pure calls. Keep these generated helper BEAMs with historical workflow versions. Define same-file helpers before their callers, or place them in separate files.