dependency map up, some code running
[scpubgit/DX.git] / lib / DX / Hypothesis.pm
index 4c8c382..61993c5 100644 (file)
@@ -10,11 +10,13 @@ has outstanding_propositions => (is => 'ro', required => 1);
 
 has actions => (is => 'ro', required => 1);
 
+sub head_proposition { shift->outstanding_propositions->[0] }
+
 sub with_actions {
   my ($self, @actions) = @_;
   my $hyp = $self;
   foreach my $act (@actions) {
-    ($hyp, my @events) = $act->dry_run_against($hyp);
+    ($hyp, my @events) = $act->dry_run($hyp);
     return undef unless $hyp;
     $hyp = $hyp->but_recheck_for(@events);
     return undef unless $hyp;
@@ -36,12 +38,11 @@ sub resolve_head_dependent_on {
   my ($first, @rest) = @{$self->outstanding_propositions};
   $self->but(
     resolved_propositions => $self->resolved_propositions
-                                  ->but_with_resolution(
-                                      proposition => $first,
-                                      depends_on => $depends,
-                                      at_depth => $self->scope->depth,
+                                  ->with_resolution_for(
+                                      $first,
+                                      $depends,
                                     ),
-    outstanding_propositons => \@rest,
+    outstanding_propositions => \@rest,
   );
 }