vanhecke/celmex/1.0.0

NOTE: the latest version is 3.0.0

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/vanhecke/celmex is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with the same repo name found; no cached copy. Use another version.

Details

Cortex.Decode

Decoder helpers shared across Cortex.Api.* modules.

The Cortex Advanced API consistently wraps responses in a {"reply": ...} envelope, several response shapes return lists that may be omitted when empty, and pipeline-style decoders need an andMap once Json.Decode.map8 runs out of slots. Centralising these three primitives here keeps the per-API modules focused on their own shapes.

reply : Decoder a -> Decoder a

Unwrap the reply envelope that Cortex wraps around every success response.

optionalList : String -> Decoder a -> Decoder (List a)

Decode a list field, defaulting to the empty list when the field is absent.

andMap : Decoder a -> Decoder (a -> b) -> Decoder b

Pipeline-style helper to apply an additional decoder when Decode.mapN runs out of positional slots.