brian-watkins / elm-spec / Spec.Report

Functions for building reports that are displayed by the elm-spec JavaScript runner.

Build a Report


type Report

Represents a collection of notes or facts.

For example, a Report can describe why a Claim was rejected.

note : String -> Report

Generate a Report that is a single line of text.

fact : String -> String -> Report

Generate a Report that is a line of text followed by some details that should be emphasized.

batch : List Report -> Report

Combine a list of reports into one.

Convert to and from JSON

decoder : Json.Decode.Decoder Report

Decode a Report from an appropriate JSON object.

encode : Report -> Json.Encode.Value

Encode a Report into a JSON object.