8 Hypothesis Scope ResolvedPropositionSet Proposition DependencyMap
9 PropositionSequence QueryState ShellState ShellSession SearchState
10 ResolutionSpace ResolutionStrategy Resolution Expander SearchProcess
13 Step Action ActionPolicy Predicate Value ActionBuilder Update
16 DependencyType _DependencyTree DependencySpec
17 One DependencyGroupEntry DependencyGroup ValuePath
18 EventType ApertureList DependencyList ShellMode
23 use Types::Standard qw(
24 ArrayRef Tuple HashRef Dict Maybe Optional slurpy Str Enum
26 use DX::Utils qw(:event_types :dep_types);
28 foreach my $class (our @CLASSES) {
29 class_type $class => { class => 'DX::'.$class };
32 foreach my $role (our @ROLES) {
33 role_type $role => { role => 'DX::Role::'.$role };
36 class_type DictValue => { class => 'DX::Value::Dict' };
38 declare ValuePath => as ArrayRef[Str];
40 declare PropositionList => as ArrayRef[Proposition];
42 declare DecisionList => as ArrayRef[Tuple[ResolutionSpace, SearchState]];
44 declare DependencyType => where {
45 foreach my $cand (EXISTENCE_OF, TYPE_OF, INDICES_OF, CONTENTS_OF) {
46 return 1 if $_ eq $cand;
51 declare EventType => where {
52 foreach my $cand (VALUE_SET, VALUE_EXISTS) {
53 return 1 if $_ eq $cand;
58 declare _DependencyTree => where { is_DependencyTree($_) };
60 declare DependencySpec => as Tuple[DependencyType, slurpy ValuePath];
62 declare DependencyList => as ArrayRef[DependencySpec];
64 declare One => where { !ref($_) and $_ eq 1 };
66 declare DependencyTree => # [ \%subtree, \%existence_of, ... ]
68 Maybe[_DependencyTree],
69 (Optional[Maybe[HashRef[One]]]) x 4
72 declare ApertureList => as ArrayRef[Tuple[EventType, slurpy ValuePath]];
74 declare ShellMode => as Enum[qw(shell query)];
76 ## These were from the dependency group thing which makes no sense until
77 ## we have scoping, so revisit it then
79 #declare DependencyGroupEntry =>
80 # as Tuple[DependencyType, slurpy ArrayRef[Value|Str]];
82 #declare DependencyGroup =>
83 # as Tuple[Maybe[Value], slurpy ArrayRef[DependencyGroupEntry]];
85 #declare DependencyGroupList => as ArrayRef[DependencyGroup];