| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Deontic.Civil.Evaluate
Description
Omnibus evaluator: runs all act types against a unified set of facts.
Given a CaseFacts, evaluateAll constructs every applicable act type,
queries the framework, and returns all relevant results. The only human
input is the fact mapping; everything else is mechanical.
Synopsis
- data CaseFacts = CaseFacts {}
- data CaseResult = CaseResult {}
- evaluateAll :: CaseFacts -> [CaseResult]
- defaultCaseFacts :: PersonId -> ActId -> CaseFacts
- domainFact :: DomainKey a -> a -> CaseFacts -> CaseFacts
Documentation
Unified case facts. The omnibus input to evaluateAll.
Boolean/flag facts go in cfCivilFacts. Structured facts for
domain-specific act types are stored in a DMap keyed by
DomainKey — only provided when the case involves that legal issue.
Constructors
| CaseFacts | |
Fields
| |
data CaseResult Source #
A single evaluation result.
Constructors
| CaseResult | |
Fields
| |
evaluateAll :: CaseFacts -> [CaseResult] Source #
Run all act types against the case facts. Returns all results for relevant (guarded) act types, including trivially valid ones — so the output shows every act type that was checked, not just those with non-trivial verdicts.
Act types with unconditional base verdicts (ShamAct → always Void, MistakeAct → always Voidable, etc.) require a trigger fact to be present, because selecting that act type IS the relevant fact in the real legal analysis.