Compile .hs configuration into validated IR #3

Closed
opened 2026-06-01 13:43:26 +02:00 by yorunikakeru · 0 comments
Owner

Parent: #1

Goal

Provide the compiler entry point that evaluates a FrogOS Haskell eDSL configuration, builds UnvalidatedConfiguration, validates it, and emits versioned JSON.

Tasks

• Define a deterministic entry point for a configuration value.
• Compile .hs files with their ordinary explicit Haskell imports.
• Do not inject a hidden FrogOS prelude or automatic imports.
• Convert builder output through validate :: UnvalidatedConfiguration -> Either [ValidationError] IR.
• Serialize only successful IR values.
• Preserve useful source and configuration context in errors where feasible.

Out of scope

• Activation plans and system changes.
• Dynamic environment checks.
• swamp switch and engine orchestration.
• A separate DSL-level import resolver.

Acceptance criteria

• Valid configuration with explicit imports produces one stable JSON document.
• Missing imports produce ordinary useful Haskell compiler errors.
• Invalid configuration exits without JSON and reports accumulated validation errors.
• Same configuration produces deterministic output.

Parent: #1 ## Goal Provide the compiler entry point that evaluates a FrogOS Haskell eDSL configuration, builds UnvalidatedConfiguration, validates it, and emits versioned JSON. ## Tasks • Define a deterministic entry point for a configuration value. • Compile .hs files with their ordinary explicit Haskell imports. • Do not inject a hidden FrogOS prelude or automatic imports. • Convert builder output through validate :: UnvalidatedConfiguration -> Either [ValidationError] IR. • Serialize only successful IR values. • Preserve useful source and configuration context in errors where feasible. ## Out of scope • Activation plans and system changes. • Dynamic environment checks. • swamp switch and engine orchestration. • A separate DSL-level import resolver. ## Acceptance criteria • Valid configuration with explicit imports produces one stable JSON document. • Missing imports produce ordinary useful Haskell compiler errors. • Invalid configuration exits without JSON and reports accumulated validation errors. • Same configuration produces deterministic output.
yorunikakeru changed title from Implement hidden Haskell evaluator for .frog configs to Compile .frog configuration into validated IR 2026-06-06 14:02:07 +02:00
yorunikakeru changed title from Compile .frog configuration into validated IR to Compile .hs configuration into validated IR 2026-06-09 22:42:28 +02:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
FrogOS/DSL#3
No description provided.