Compile-time exhaustiveness checking for Malli :enum schemas.
Provides macros that emit case expressions while verifying at
macro-expansion time that every enum value is handled.
Usage: (def Status [:enum :draft :published :archived])
(enum-case Status status :draft (handle-draft) :published (handle-published) :archived (handle-archived))
If a branch is missing, macro expansion fails with a clear error.
Supports:
(:a :b) exprenum-case*Compile-time exhaustiveness checking for Malli :enum schemas.
Provides macros that emit `case` expressions while verifying at
macro-expansion time that every enum value is handled.
Usage:
(def Status [:enum :draft :published :archived])
(enum-case Status status
:draft (handle-draft)
:published (handle-published)
:archived (handle-archived))
If a branch is missing, macro expansion fails with a clear error.
Supports:
- Var-based schema references (symbol pointing to a def)
- Malli registry lookups (qualified keyword)
- Inline schema literals (vector)
- Grouped match values like `(:a :b) expr`
- Optional default branch via `enum-case*`cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |