switch to preserving original step in alt list
[scpubgit/DX.git] / lib / DX / Types.pm
index 729fa60..8c2602a 100644 (file)
@@ -6,6 +6,7 @@ use Type::Library
   -declare => (
     (our @CLASSES = qw(
       Hypothesis Scope ResolvedPropositionSet Proposition DependencyMap
+      PropositionSequence QueryState ShellState ShellSession SearchState
     )),
     (our @ROLES = qw(
       Step Action ActionPolicy Predicate Value
@@ -32,10 +33,10 @@ foreach my $role (our @ROLES) {
 
 class_type DictValue => { class => 'DX::Value::Dict' };
 
-declare AlternativeList => as ArrayRef[Tuple[Hypothesis, Step]];
+declare AlternativeList => as ArrayRef[Tuple[Step, Hypothesis]];
 
 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;
@@ -60,12 +61,15 @@ 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 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;