def Generation.needs.of

bend-trace-context@0.2.0.0 · trace_context.bend:1416

import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext
import Base

1416# Whether a step needs another word within `fuel` more words.
1417def Generation.needs.of(fuel: Nat, step: Step) -> Bool:
1418  match fuel step:
1419    case 0n _:
1420      False{}
1421    case 1n+p NeedWord{draw}:
1422      True{}
1423    case 1n+p Created{context}:
1424      False{}
1425    case 1n+p Failed{error}:
1426      False{}

Uses (3)

Used by (1)