StatifierBlocks.Assignability.Relation behaviour (StatifierBlocks v0.1.0)

Copy Markdown View Source

A host's widening relation. Consulted only after identity has failed, so an implementation can only widen, never narrow (ADR-0003 decision 6).

Pure, under ADR-0002 decision 4: no process dictionary, no application configuration, no IO, no clock, no randomness. assignable?/2 is called during validation on every edit, so anything impure here breaks the determinism the compiler promises.

Summary

Callbacks

Does produced widen to satisfy consumed? Called only when produced == consumed has already failed (ADR-0003 decision 6), so a module answering true here can only grow the accepted set, never shrink it.

Callbacks

assignable?(produced, consumed)

@callback assignable?(
  produced :: StatifierBlocks.Assignability.type_expr(),
  consumed :: StatifierBlocks.Assignability.type_expr()
) :: boolean()

Does produced widen to satisfy consumed? Called only when produced == consumed has already failed (ADR-0003 decision 6), so a module answering true here can only grow the accepted set, never shrink it.