jev-dsl
Early-alpha Haskell DSL that encodes typed question packets and decodes answers; HTTP transport is left to the caller.
# jev-dsl
Typed semantic queries for Haskell, using [TypeSafe’s Jev](https://docs.typesafe.ai).
Ask whether evidence supports a claim, select a candidate, or route a reply into
an authored continuation. The answers retain the Haskell values you supplied:
rows, domain values, functions, or actions.
Compose queries with `Applicative` and `Traversable`, adapt assessments with
`Star`, edit payloads with optics, and choose evaluation strategies with
`Selective`. The library builds and validates requests, groups questions that
share a state, and decodes responses against the original alternatives. You
supply the transport and run any selected actions.
**Early alpha, 0.2.0.0.** Used by the examples here and Exomonad’s hosted Haskell
interface. Start with `Jev.Operators` for Aeson, or `Jev.Core` for your own JSON
type. See the [authoring guide](docs/authoring.md) for the API and the
[composition guide](docs/composition.md) for evaluation and replay contracts.
## Compose assessments over your data
An assessment combines a projection into evidence with a query over that
evidence. Here, `reportState` exposes a report’s claim and supporting material:
```haskell
assessReport = J.assessment reportState $ \world ->
J.judge J.careful <$> J.question world #supported
(J.noul ("Does " <> J.field #evidence world <> " support " <> J.field #claim world <> "?"))
reviewPending = traverseOf (traversed . _2)
(runStar (lmap (view helperReport) assessReport))
```
`assessReport` is a standard `Star` arrow from a report to a query result.
`lmap` lets it accept a helper containing a report; the traversal applies it to
the second element of each pair, preserving the identifiers. The result is one
composed query whose answers keep that structure. Complete definitions and
imports are in