=begin pod :kind("Type") :subkind("role") :category("domain-specific")

=TITLE role CompUnit::Repository

=SUBTITLE CompUnit::Repository

The C<CompUnit::Repository> role defines the interface of the implementation
of CompUnit::Repositories such as L<CompUnit::Repository::Installation|/type/CompUnit::Repository::Installation>
and L<CompUnit::Repository::FileSystem|/type/CompUnit::Repository::FileSystem>.

=head1 Methods

=head2 method resolve

    method resolve(CompUnit::DependencySpecification $spec --> CompUnit:D)

Returns a L<CompUnit|/type/CompUnit> mapped to the highest version distribution matching
C<$spec> from the first repository in the repository chain that contains any
version of a distribution matching C<$spec>.

=head2 method need

Loads and returns a L<CompUnit|/type/CompUnit> which is mapped to the highest version
distribution matching C<$spec> from the first repository in the repository
chain that contains any version of a distribution matching C<$spec>.

=head2 method load

    method load(IO::Path:D $file --> CompUnit:D)

Load the C<$file> and return a L<CompUnit|/type/CompUnit> object representing it.

=head2 method loaded

    method loaded(--> Iterable:D)

Returns all L<CompUnit|/type/CompUnit>s this repository has loaded.

=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
