8 Hypothesis Scope ResolvedPropositionSet Proposition DependencyMap
9 PropositionSequence QueryState ShellState ShellSession SearchState
12 Step Action ActionPolicy Predicate Value
15 DependencyType _DependencyTree DependecySpec
16 One DependencyGroupEntry DependencyGroup
21 use Types::Standard qw(
22 ArrayRef Tuple HashRef Dict Maybe Optional slurpy Str
24 use DX::Utils qw(:event_types :dep_types);
26 foreach my $class (our @CLASSES) {
27 class_type $class => { class => 'DX::'.$class };
30 foreach my $role (our @ROLES) {
31 role_type $role => { role => 'DX::Role::'.$role };
34 class_type DictValue => { class => 'DX::Value::Dict' };
36 declare AdjustmentList => as ArrayRef[Tuple[Step, Hypothesis]];
38 declare DependencyType => where {
39 foreach my $cand (EXISTENCE_OF, TYPE_OF, INDICES_OF, CONTENTS_OF) {
40 return 1 if $_ eq $cand;
45 declare EventType => where {
46 foreach my $cand (VALUE_SET, VALUE_EXISTS) {
47 return 1 if $_ eq $cand;
52 declare _DependencyTree => where { is_DependencyTree($_) };
54 declare DependencySpec => as Tuple[DependencyType, slurpy ArrayRef[Str]];
56 declare One => where { !ref($_) and $_ eq 1 };
58 declare DependencyTree => # [ \%subtree, \%existence_of, ... ]
60 Maybe[_DependencyTree],
61 (Optional[Maybe[HashRef[One]]]) x 4
64 ## These were from the dependency group thing which makes no sense until
65 ## we have scoping, so revisit it then
67 #declare DependencyGroupEntry =>
68 # as Tuple[DependencyType, slurpy ArrayRef[Value|Str]];
70 #declare DependencyGroup =>
71 # as Tuple[Maybe[Value], slurpy ArrayRef[DependencyGroupEntry]];
73 #declare DependencyGroupList => as ArrayRef[DependencyGroup];