<commit_before>=begin pod

=TITLE Typesystem

=SUBTITLE Introduction to the type system of Perl 6

=head1 Definition of a Perl 6 Type

TODO

=head1 Type Declarators

TODO

=head2 C<class>

TODO

=head2 C<role>

TODO

=head2 C<enum>

TODO

=head2 C<module>

TODO

=head2 C<package>

TODO

=head2 C<grammar>

TODO

=head2 C<subset>

TODO

=end pod<commit_msg>doc subset<commit_after>=begin pod

=TITLE Typesystem

=SUBTITLE Introduction to the type system of Perl 6

=head1 Definition of a Perl 6 Type

TODO

=head1 Type Declarators

TODO

=head2 C<class>

TODO

=head2 C<role>

TODO

=head2 C<enum>

TODO

=head2 C<module>

TODO

=head2 C<package>

TODO

=head2 C<grammar>

TODO

=head2 C<subset>

A C<I<subset>> declares a new type that will re-dispatch to it's base type. If a
C<where> clause is supplied any assignment will be checked against the given
code object.

    subset Positive of Int where * > -1; 
    my Positive $i = 1;
    $i = -42; # OUTPUT«Type check failed in assignment to $i; expected Positive but got Int (-42)␤ …»

=end pod
{'fraction_non_alphanumeric': 0.0869980879541109, 'fraction_numerical': 0.02676864244741874, 'mean_word_length': 3.824884792626728, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2459138', 'n_tokens_mistral': 433, 'n_tokens_neox': 410, 'n_words': 153}