shipwithjev

Catalog / Tools & apps

0275GitHub

jev-dsl

Early-alpha Haskell DSL that encodes typed question packets and decodes answers; HTTP transport is left to the caller.

inanna-malick/jev-dslREADME ↗
# 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 

Also filed under Tools & apps

  1. 0616

    Jevstiller: distill Jev calls into a local model

    A self-hosted proxy that trains a local model on Jev's answers. It served 72% of Banking77 locally at 15 ms, with a 2% audit and a bound on disagreement.

    tomerglick57 · Tools & apps · 15 ms local

  2. 0611

    Scruple: code checks for what linters miss

    Semantic-aware linting with System One models: rules you can state in a sentence, checked against your code by Jev.

    @nalexpeae · Tools & apps

  3. 0606

    Algolia-style Postgres search with a Jev reranker

    Typo tolerance, typeahead, barcodes and facet counts in plain Postgres SQL, plus an optional Jev step that asks one question per top-10 result.

    @alex_forman1 · Tools & apps

  4. 0604

    Virtual Closet: outfits from closet videos

    built a virtual closet & outfit generator from raw closet videos. classification + semantic search thanks to jev 🥰. clueless closet dreams finally coming to life

    @maitreemervana · Tools & apps