fully type Resolution* classes
[scpubgit/DX.git] / lib / DX / Types.pm
index 47a307b..2482f01 100644 (file)
@@ -6,14 +6,16 @@ use Type::Library
   -declare => (
     (our @CLASSES = qw(
       Hypothesis Scope ResolvedPropositionSet Proposition DependencyMap
-      PropositionSequence QueryState ShellState ShellSession
+      PropositionSequence QueryState ShellState ShellSession SearchState
+      ResolutionSpace ResolutionStrategy Resolution
     )),
     (our @ROLES = qw(
-      Step Action ActionPolicy Predicate Value
+      Step Action ActionPolicy Predicate Value ActionBuilder Update
     )),
     qw(
-      DependencyType _DependencyTree DependecySpec
-      One DependencyGroupEntry DependencyGroup
+      DependencyType _DependencyTree DependencySpec
+      One DependencyGroupEntry DependencyGroup ValuePath
+      EventType ApertureList DependencyList
     ),
   )
 ;
@@ -33,10 +35,14 @@ foreach my $role (our @ROLES) {
 
 class_type DictValue => { class => 'DX::Value::Dict' };
 
-declare AlternativeList => as ArrayRef[Tuple[Hypothesis, Step]];
+declare ValuePath => as ArrayRef[Str];
+
+declare PropositionList => as ArrayRef[Proposition];
+
+declare DecisionList => as ArrayRef[Tuple[ResolutionSpace, SearchState]];
 
 declare DependencyType => where {
-  foreach my $cand (EXISTENCE_OF, INDICES_OF, TYPE_OF, CONTENTS_OF) {
+  foreach my $cand (EXISTENCE_OF, TYPE_OF, INDICES_OF, CONTENTS_OF) {
     return 1 if $_ eq $cand;
   }
   return 0;
@@ -51,7 +57,9 @@ declare EventType => where {
 
 declare _DependencyTree => where { is_DependencyTree($_) };
 
-declare DependencySpec => as Tuple[DependencyType, slurpy ArrayRef[Str]];
+declare DependencySpec => as Tuple[DependencyType, slurpy ValuePath];
+
+declare DependencyList => as ArrayRef[DependencySpec];
 
 declare One => where { !ref($_) and $_ eq 1 };
 
@@ -61,12 +69,17 @@ declare DependencyTree => # [ \%subtree, \%existence_of, ... ]
        (Optional[Maybe[HashRef[One]]]) x 4
      ]];
 
-declare DependencyGroupEntry =>
-  as Tuple[DependencyType, slurpy ArrayRef[Value|Str]];
-
-declare DependencyGroup =>
-  as Tuple[Maybe[Value], slurpy ArrayRef[DependencyGroupEntry]];
+declare ApertureList => as ArrayRef[Tuple[EventType, slurpy ValuePath]];
 
-declare DependencyGroupList => as ArrayRef[DependencyGroup];
+## These were from the dependency group thing which makes no sense until
+## we have scoping, so revisit it then
+#
+#declare DependencyGroupEntry =>
+#  as Tuple[DependencyType, slurpy ArrayRef[Value|Str]];
+#
+#declare DependencyGroup =>
+#  as Tuple[Maybe[Value], slurpy ArrayRef[DependencyGroupEntry]];
+#
+#declare DependencyGroupList => as ArrayRef[DependencyGroup];
 
 1;