8 Hypothesis Scope ResolvedPropositionSet Proposition DependencyMap
9 PropositionSequence QueryState ShellState ShellSession SearchState
10 ResolutionSpace ResolutionStrategy Resolution
13 Step Action ActionPolicy Predicate Value
16 DependencyType _DependencyTree DependencySpec
17 One DependencyGroupEntry DependencyGroup
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 PropositionList => as ArrayRef[Proposition];
39 declare DecisionList => as ArrayRef[Tuple[ResolutionSpace, SearchState]];
41 declare DependencyType => where {
42 foreach my $cand (EXISTENCE_OF, TYPE_OF, INDICES_OF, CONTENTS_OF) {
43 return 1 if $_ eq $cand;
48 declare EventType => where {
49 foreach my $cand (VALUE_SET, VALUE_EXISTS) {
50 return 1 if $_ eq $cand;
55 declare _DependencyTree => where { is_DependencyTree($_) };
57 declare DependencySpec => as Tuple[DependencyType, slurpy ArrayRef[Str]];
59 declare DependencyList => as ArrayRef[DependencySpec];
61 declare One => where { !ref($_) and $_ eq 1 };
63 declare DependencyTree => # [ \%subtree, \%existence_of, ... ]
65 Maybe[_DependencyTree],
66 (Optional[Maybe[HashRef[One]]]) x 4
69 ## These were from the dependency group thing which makes no sense until
70 ## we have scoping, so revisit it then
72 #declare DependencyGroupEntry =>
73 # as Tuple[DependencyType, slurpy ArrayRef[Value|Str]];
75 #declare DependencyGroup =>
76 # as Tuple[Maybe[Value], slurpy ArrayRef[DependencyGroupEntry]];
78 #declare DependencyGroupList => as ArrayRef[DependencyGroup];