ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Rules.Render

Description

The sentences a reader sees for what the rules return. A rule returns facts, and a log line, a denial body, or an audit line asks here for the text. Each render is total over its typed value, so a reader needs no handler around it.

Synopsis

A decision and its parts

renderDecision :: RuleEvidence -> Decision -> Text Source #

A decision as one line, for logs and the denial response body.

renderReason :: Reason -> Text Source #

One reason as the sentence the audit trail and a denial body carry.

renderInability :: Inability -> Text Source #

Why a rule could not vet, without the rule's name, which its holder prints beside it.

renderDuration :: NominalDiffTime -> Text Source #

Keep two non-zero units to distinguish near-threshold durations. Negative values render as zero.