Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adds ParametricRoleGroupHOW
This part becomes a bit more complete, and allows us to understand the
inner workings (in fact, the *high-order-work* of Perl 6). Although
they are not (so much) intended for final user, they have been used,
for instance, in https://github.com/vrurg/Perl6-OO-Plugin

This closes #1306. Although there might be a few other metamodel
classes that have not been documented, they are probably deeper down
in the implementation and will never be seen by the user. There's no
request to use them, anyway.
  • Loading branch information
JJ committed Apr 14, 2019
1 parent 180ffda commit 2401b58
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions doc/Type/Metamodel/ParametricRoleGroupHOW.pod6
@@ -0,0 +1,32 @@
=begin pod
=TITLE role Metamodel::ParametricRoleGroupHOW
=SUBTITLE Represents a group of roles with different parametrizations
class Metamodel::ParametricRoleGroupHOW
does Metamodel::Naming
does Metamodel::Documenting
does Metamodel::Stashing
does Metamodel::TypePretense
does Metamodel::RolePunning
does Metamodel::BoolificationProtocol {}
A C<ParametricRoleGroupHOW> groups a set of C<ParametricRoleHOW>, every one of them representing a single role declaration with their own parameter sets.
=for code
(role Zape[::T] {}).HOW.say; # OUTPUT: «Perl6::Metamodel::ParametricRoleHOW.new␤»
Zape.HOW.say ; # OUTPUT: «Perl6::Metamodel::ParametricRoleGroupHOW.new␤»
C<ParametricRoleHOW>s need to be added to this kind of group:
=for code
my \zape := Metamodel::ParametricRoleGroupHOW.new_type( name => "zape");
my \zipi := Metamodel::ParametricRoleHOW.new_type( name => "zipi", group => zape);
say zipi.HOW; # OUTPUT: «Perl6::Metamodel::ParametricRoleHOW.new␤»
I<Note>: As most of the C<Metamodel> classes, this class is here mainly for
illustration purposes and it's not intended for the final user to instantiate.
=end pod

0 comments on commit 2401b58

Please sign in to comment.