switch recheck to using an on_completion_step
[scpubgit/DX.git] / lib / DX / Proposition.pm
index 56d1d2a..b682392 100644 (file)
@@ -1,14 +1,15 @@
 package DX::Proposition;
 
+use Types::Standard qw(HashRef ArrayRef Str);
 use DX::Class;
 
-has predicate => (is => 'ro', required => 1);
+has predicate => (is => 'ro', isa => Str, required => 1);
 
-has args => (is => 'ro', required => 1);
+has args => (is => 'ro', isa => ArrayRef, required => 1);
 
-has introduces_names => (is => 'ro', required => 1);
+has introduced_names => (is => 'ro', isa => HashRef, required => 1);
 
-has requires_names => (is => 'ro', required => 1);
+has required_names => (is => 'ro', isa => HashRef, required => 1);
 
 sub resolve_for {
   my ($self, $scope) = @_;
@@ -17,7 +18,7 @@ sub resolve_for {
   #if (my $step = $scope->known_facts->resolution_step_for($predicate, @args)) {
   #  return $step;
   #}
-  return $predicate->resolution_step_for(@args);
+  return $predicate->resolution_step_for($self, @args);
 }
 
 1;