package DX::ResolvedPropositionSet;
use DX::DependencyMap;
-use Types::Standard qw(ArrayRef);
+use Types::Standard qw(ArrayRef Int);
use DX::Utils qw(deparse);
use DX::Class;
has propositions => (is => 'ro', isa => ArrayRef[Proposition], required => 1);
-has scope_depth => (is => 'ro', required => 1);
+has scope_depth => (is => 'ro', isa => Int, required => 1);
sub resolved_count { scalar @{$_[0]->propositions} }
package DX::Scope;
-use Types::Standard qw(HashRef ArrayRef);
+use Types::Standard qw(HashRef ArrayRef Str);
use DX::Class;
has predicates => (is => 'ro', isa => HashRef[Predicate], required => 1);
has locals => (is => 'ro', isa => ArrayRef[DictValue], required => 1);
-has lex_map => (is => 'ro', isa => HashRef, required => 1);
+has lex_map => (is => 'ro', isa => HashRef[ArrayRef[Str]], required => 1);
#has known_facts => (is => 'ro', required => 1);
package DX::SearchState;
-use Types::Standard qw(Maybe);
+use Types::Standard qw(Maybe Bool);
use DX::Step::Backtrack;
use DX::Step::ConsiderProposition;
use DX::Step::MarkAsSolution;
has adjustments_made => (is => 'ro', isa => AdjustmentList, required => 1);
-has is_solution_state => (is => 'ro', required => 1);
+has is_solution_state => (is => 'ro', isa => Bool, required => 1);
has on_exhaustion_step => (is => 'ro', isa => Maybe[Step], required => 1);
package DX::ShellFrontend;
+use Types::Standard qw(Enum);
use IO::Handle;
use Caroline;
use DX::Class;
has session => (
- is => 'ro', required => 1,
+ is => 'ro', isa => ShellSession, required => 1,
handles => [ qw(is_complete_command_string eval_command_string) ]
);
-has session_mode => (is => 'rwp', required => 1);
+has session_mode => (is => 'rwp', isa => Enum['shell','query'], required => 1);
has readline => (is => 'lazy', builder => sub { Caroline->new });