Reach.Effects.Classification (Reach v2.8.3)

Copy Markdown View Source

Explains an effect classification and where it came from.

Reach.Effects.classify/2 remains the compact atom-returning API. Use Reach.Effects.classify_with_provenance/2 when callers need to distinguish explicit semantics from typespec or project-local inference.

Summary

Types

confidence()

@type confidence() :: :high | :medium | :low

reason()

@type reason() ::
  :dynamic_dispatch
  | :unresolved_local
  | :unresolved_module
  | :insufficient_semantics
  | :unsupported_call
  | :unsupported_node

source()

@type source() ::
  :intrinsic
  | :plugin
  | :local_inference
  | :dependency_inference
  | :builtin
  | :typespec
  | :inferred_type
  | :unknown

t()

@type t() :: %Reach.Effects.Classification{
  classifier: module() | nil,
  confidence: confidence(),
  effect: Reach.Effects.effect(),
  reason: reason() | nil,
  source: source()
}

Functions

new(effect, source, confidence, opts \\ [])

@spec new(Reach.Effects.effect(), source(), confidence(), keyword()) :: t()