8 Hypothesis Scope ResolvedPropositionSet Proposition DependencyMap
9 PropositionSequence QueryState ShellState ShellSession SearchState
10 ResolutionSpace ResolutionStrategy Resolution
13 Step Action ActionPolicy Predicate Value ActionBuilder Update
16 DependencyType _DependencyTree DependencySpec
17 One DependencyGroupEntry DependencyGroup ValuePath
22 use Types::Standard qw(
23 ArrayRef Tuple HashRef Dict Maybe Optional slurpy Str
25 use DX::Utils qw(:event_types :dep_types);
27 foreach my $class (our @CLASSES) {
28 class_type $class => { class => 'DX::'.$class };
31 foreach my $role (our @ROLES) {
32 role_type $role => { role => 'DX::Role::'.$role };
35 class_type DictValue => { class => 'DX::Value::Dict' };
37 declare ValuePath => as ArrayRef[Str];
39 declare PropositionList => as ArrayRef[Proposition];
41 declare DecisionList => as ArrayRef[Tuple[ResolutionSpace, SearchState]];
43 declare DependencyType => where {
44 foreach my $cand (EXISTENCE_OF, TYPE_OF, INDICES_OF, CONTENTS_OF) {
45 return 1 if $_ eq $cand;
50 declare EventType => where {
51 foreach my $cand (VALUE_SET, VALUE_EXISTS) {
52 return 1 if $_ eq $cand;
57 declare _DependencyTree => where { is_DependencyTree($_) };
59 declare DependencySpec => as Tuple[DependencyType, slurpy ArrayRef[Str]];
61 declare DependencyList => as ArrayRef[DependencySpec];
63 declare One => where { !ref($_) and $_ eq 1 };
65 declare DependencyTree => # [ \%subtree, \%existence_of, ... ]
67 Maybe[_DependencyTree],
68 (Optional[Maybe[HashRef[One]]]) x 4
71 ## These were from the dependency group thing which makes no sense until
72 ## we have scoping, so revisit it then
74 #declare DependencyGroupEntry =>
75 # as Tuple[DependencyType, slurpy ArrayRef[Value|Str]];
77 #declare DependencyGroup =>
78 # as Tuple[Maybe[Value], slurpy ArrayRef[DependencyGroupEntry]];
80 #declare DependencyGroupList => as ArrayRef[DependencyGroup];