module Deontic.BGB.Types
( CapacityAct(..)
, BGBFact(..)
, LimitedCapacity
) where
import Data.Set (Set)
import Deontic.Core.Types (PersonId, ActId, Facts)
data CapacityAct = CapacityAct
{ CapacityAct -> PersonId
caActor :: PersonId
, CapacityAct -> ActId
caActId :: ActId
} deriving (CapacityAct -> CapacityAct -> Bool
(CapacityAct -> CapacityAct -> Bool)
-> (CapacityAct -> CapacityAct -> Bool) -> Eq CapacityAct
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CapacityAct -> CapacityAct -> Bool
== :: CapacityAct -> CapacityAct -> Bool
$c/= :: CapacityAct -> CapacityAct -> Bool
/= :: CapacityAct -> CapacityAct -> Bool
Eq, Int -> CapacityAct -> ShowS
[CapacityAct] -> ShowS
CapacityAct -> String
(Int -> CapacityAct -> ShowS)
-> (CapacityAct -> String)
-> ([CapacityAct] -> ShowS)
-> Show CapacityAct
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CapacityAct -> ShowS
showsPrec :: Int -> CapacityAct -> ShowS
$cshow :: CapacityAct -> String
show :: CapacityAct -> String
$cshowList :: [CapacityAct] -> ShowS
showList :: [CapacityAct] -> ShowS
Show)
data LimitedCapacity
data BGBFact
= UnderSeven PersonId
| PermanentlyIncapable PersonId
| IsMinor PersonId
| LegalRepConsent PersonId ActId
| PurelyBeneficial
| PocketMoney
deriving (BGBFact -> BGBFact -> Bool
(BGBFact -> BGBFact -> Bool)
-> (BGBFact -> BGBFact -> Bool) -> Eq BGBFact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BGBFact -> BGBFact -> Bool
== :: BGBFact -> BGBFact -> Bool
$c/= :: BGBFact -> BGBFact -> Bool
/= :: BGBFact -> BGBFact -> Bool
Eq, Eq BGBFact
Eq BGBFact =>
(BGBFact -> BGBFact -> Ordering)
-> (BGBFact -> BGBFact -> Bool)
-> (BGBFact -> BGBFact -> Bool)
-> (BGBFact -> BGBFact -> Bool)
-> (BGBFact -> BGBFact -> Bool)
-> (BGBFact -> BGBFact -> BGBFact)
-> (BGBFact -> BGBFact -> BGBFact)
-> Ord BGBFact
BGBFact -> BGBFact -> Bool
BGBFact -> BGBFact -> Ordering
BGBFact -> BGBFact -> BGBFact
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: BGBFact -> BGBFact -> Ordering
compare :: BGBFact -> BGBFact -> Ordering
$c< :: BGBFact -> BGBFact -> Bool
< :: BGBFact -> BGBFact -> Bool
$c<= :: BGBFact -> BGBFact -> Bool
<= :: BGBFact -> BGBFact -> Bool
$c> :: BGBFact -> BGBFact -> Bool
> :: BGBFact -> BGBFact -> Bool
$c>= :: BGBFact -> BGBFact -> Bool
>= :: BGBFact -> BGBFact -> Bool
$cmax :: BGBFact -> BGBFact -> BGBFact
max :: BGBFact -> BGBFact -> BGBFact
$cmin :: BGBFact -> BGBFact -> BGBFact
min :: BGBFact -> BGBFact -> BGBFact
Ord, Int -> BGBFact -> ShowS
[BGBFact] -> ShowS
BGBFact -> String
(Int -> BGBFact -> ShowS)
-> (BGBFact -> String) -> ([BGBFact] -> ShowS) -> Show BGBFact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BGBFact -> ShowS
showsPrec :: Int -> BGBFact -> ShowS
$cshow :: BGBFact -> String
show :: BGBFact -> String
$cshowList :: [BGBFact] -> ShowS
showList :: [BGBFact] -> ShowS
Show)
type instance Facts CapacityAct = Set BGBFact