package DX::ResolutionSpace;
use DX::Utils qw(step);
+use DX::Step::Backtrack;
use DX::Class;
has proposition => (is => 'ro');
sub next_step {
my ($self) = @_;
- return undef unless @{$self->members};
+ return DX::Step::Backtrack->new unless @{$self->members};
return step(
resolves => $self->proposition,
resolution_space => $self,
@{$self->proposition->for_deparse->[1]},
],
];
- if (my $step = $self->proposition->resolve_for($hyp->scope)) {
- return $ss->but(next_step => $step);
- }
- return $ss->but(next_step => DX::Step::Backtrack->new);
+ return $ss->but(next_step => $self->proposition->resolve_for($hyp->scope));
}
1;