deontic-kr-civil-0.2.0.0: Korean Civil Act (민법) with type-level stratified deontic logic
Safe HaskellSafe-Inferred
LanguageGHC2021

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

Documentation

data CaseFacts Source #

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.

defaultCaseFacts :: PersonId -> ActId -> CaseFacts Source #

Convenience constructor with all optional fields empty.

domainFact :: DomainKey a -> a -> CaseFacts -> CaseFacts Source #

Insert a domain-specific fact record into a CaseFacts.