design: validate fails fast on first error — spec promises full accumulation (Either [ValidationError]) #31
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
FrogOS/DSL#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Spec README: semantic validation "Накапливает все ошибки сразу: `Either [ValidationError] IR`".
Actual signature: `validate :: UnvalidatedConfiguration -> Either ValidationError ValidatedIR` (src/DSL/Validate.hs:52) — `<|>`/`asum`/`listToMaybe` return the first duplicate, the first intra-conflict, the first inter-conflict. A config with 10 problems takes 10 edit-compile cycles to clean.
Plus the builder layer is fail-fast too (`StateT _ (Either DomainError)`), so even before validate, a bad name aborts at the first occurrence.
Either implement accumulation (Validation/These-style applicative over all checks — duplicates, intra, inter are independent and trivially accumulable) or fix the spec to stop promising it. Accumulating in `validate` is cheap; accumulating DomainErrors in the builder is a bigger redesign and can be a separate decision.