extract backtrack decisions out into steps
[scpubgit/DX.git] / lib / DX / Step / Normal.pm
index 2ec93aa..e314088 100644 (file)
@@ -30,7 +30,7 @@ sub apply_to {
   trace 'step.apply.old_hyp '.$self => $old_hyp;
   trace 'step.apply.actions '.$self => $self->actions;
   my $new_hyp = $self->_apply_to_hyp($old_hyp);
-  return (undef, $self->alternative_step) unless $new_hyp;
+  return $ss->but(next_step => DX::Step::Backtrack->new) unless $new_hyp;
   trace 'step.apply.new_hyp '.$self => $new_hyp;
   my $ns = DX::Step::InvokeNextPredicate->new(
     proposition => $ss->next_proposition($new_hyp)