BetaCalendars.GridAlgebra.Validation
- Package
- purescript-betacalendars-grid-algebra
- Repository
- mateopedersen/purescript-betacalendars-grid-algebra
Reusable structural checks for grids, dates, layouts, and whole years.
These checks are ordinary pure values, so applications may run them at ingestion boundaries or tests without introducing effects.
#ValidationIssue Source
data ValidationIssueA concrete invariant violation found by one of the validation functions.
Constructors
GridCellCountMismatch Int IntCurrentMonthDateSequenceMismatchFirstDayOffsetMismatch Int IntNaturalRowCountOutOfRange IntFixedGridHasWrongCellCount IntLayoutRejected LayoutError
Instances
#validateMonthGrid Source
validateMonthGrid :: MonthGrid -> Array ValidationIssueCheck row-major size, the first-day offset, natural row bounds, and date completeness for a constructed month grid.
#validateFixedGrid Source
validateFixedGrid :: MonthGrid -> Array ValidationIssueCheck that a grid explicitly selected as fixed six weeks has 42 cells.
#validateDateCompleteness Source
validateDateCompleteness :: MonthGrid -> Array ValidationIssueConfirm that days 1 through the month's final day occur exactly once and in order as current-month cells.
#validateLayout Source
validateLayout :: LayoutSpec -> Array ValidationIssueValidate a printable layout and report the specific geometry error.
#validateYear Source
validateYear :: Year -> Array ValidationIssueExhaustively validate both grid modes and all seven week origins for a year. This is deterministic finite checking, not a proof over all years.
- Modules
- BetaCalendars.
GridAlgebra - BetaCalendars.
GridAlgebra. Blank - BetaCalendars.
GridAlgebra. Boundary2027 - BetaCalendars.
GridAlgebra. Civil - BetaCalendars.
GridAlgebra. Grid - BetaCalendars.
GridAlgebra. Paper - BetaCalendars.
GridAlgebra. Validation - BetaCalendars.
GridAlgebra. WeekStart - BetaCalendars.
GridAlgebra. Year2027