ux: compiler errors are derived Show dumps — no human-readable diagnostics #32

Closed
opened 2026-06-11 15:38:23 +02:00 by yorunikakeru · 0 comments
Owner

`DSL.Compile.compileResult` renders errors as `"domain error: " <> show domainErr` / `"validation error: " <> show validationErr`. End users editing /etc/frogos/configuration.hs will see:

```
validation error: AtSection (Location ProfileKind 0 "gaming") (IntraConflict "docker")
```

instead of something like:

```
profile "gaming": service "docker" is both enabled and disabled in the same section
```

Same pattern inside FromJSON parsers across IR (`fail . show`). DomainError also lacks context — `EmptyName` doesn't say which combinator received the empty name.

Suggest a `renderError :: ValidationError -> Text` / `renderDomainError` pretty-printer used by compile, keeping Show for debugging. This is the user-facing surface of the whole "invalid config doesn't compile" pitch — worth treating like UI copy.

\`DSL.Compile.compileResult\` renders errors as \`"domain error: " <> show domainErr\` / \`"validation error: " <> show validationErr\`. End users editing /etc/frogos/configuration.hs will see: \`\`\` validation error: AtSection (Location ProfileKind 0 "gaming") (IntraConflict "docker") \`\`\` instead of something like: \`\`\` profile "gaming": service "docker" is both enabled and disabled in the same section \`\`\` Same pattern inside FromJSON parsers across IR (\`fail . show\`). DomainError also lacks context — \`EmptyName\` doesn't say *which* combinator received the empty name. Suggest a \`renderError :: ValidationError -> Text\` / \`renderDomainError\` pretty-printer used by compile, keeping Show for debugging. This is the user-facing surface of the whole "invalid config doesn't compile" pitch — worth treating like UI copy.
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#32
No description provided.