Skip to content

Commit 1de9581

Browse files
committed
Fix type formatting for several files.
(and some very minor textual cleanups)
1 parent 12859b2 commit 1de9581

14 files changed

+368
-371
lines changed

doc/Type/Any.rakudoc

Lines changed: 139 additions & 141 deletions
Large diffs are not rendered by default.

doc/Type/Associative.rakudoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
A common role for types that support name-based lookup through
1010
L«postcircumfix:<{ }>|/language/operators#postcircumfix_{_}» such as
11-
L<Hash|/type/Hash> and L<Map|/type/Map>. It is used for type checks in operators
11+
L<C<Hash>|/type/Hash> and L<C<Map>|/type/Map>. It is used for type checks in operators
1212
that expect to find specific methods to call. See
1313
L<Subscripts|/language/subscripts#Methods_to_implement_for_associative_subscripting>
1414
for details.
@@ -23,7 +23,7 @@ my %whatever := Whatever.new;
2323
=end code
2424

2525
Please note that we are using binding C<:=> here, since by default C<%>
26-
assignments expect a C<Hash> in the right-hand side, and thus assignment
26+
assignments expect a L<C<Hash>|/type/Hash> in the right-hand side, and thus assignment
2727
would try and convert it to a hash (also failing). However, with the
2828
Associative role:
2929

@@ -41,8 +41,8 @@ will be syntactically correct.
4141
C<Associative>, as the definition above shows, is actually a
4242
L<parameterized role|/language/objects#Parameterized_roles>
4343
which can use different classes for keys and values. As seen at the top of the
44-
document, by default it coerces the key to C<Str> and uses a very
45-
generic C<Mu> for value.
44+
document, by default it coerces the key to L<C<Str>|/type/Str> and uses a very
45+
generic L<C<Mu>|/type/Mu> for value.
4646

4747
my %any-hash;
4848
say %any-hash.of; # OUTPUT: «(Mu)␤»
@@ -58,8 +58,8 @@ particular classes:
5858

5959
method keyof()
6060

61-
Returns the parameterized key used for the Associative role, which is C<Any>
62-
coerced to C<Str> by default. This is the class used as second parameter when
61+
Returns the parameterized key used for the Associative role, which is L<C<Any>|/type/Any>
62+
coerced to L<C<Str>|/type/Str> by default. This is the class used as second parameter when
6363
you use the parameterized version of Associative.
6464

6565
my %any-hash;
@@ -87,7 +87,7 @@ say What.new{33}; # OUTPUT: «42␤»
8787

8888
method EXISTS-KEY(\key)
8989

90-
Should return a C<Bool> indicating whether the given key actually has a value.
90+
Should return a L<C<Bool>|/type/Bool> indicating whether the given key actually has a value.
9191

9292
=head2 method STORE
9393

@@ -101,7 +101,7 @@ my %h is Foo = a => 42, b => 666;
101101
syntax for binding your implementation of the C<Associative> role.
102102

103103
Should accept the values to (re-)initialize the object with, which either
104-
could consist of C<Pair>s, or separate key/value pairs. The optional
104+
could consist of L<C<Pair>|/type/Pair>s, or separate key/value pairs. The optional
105105
named parameter will contain a C<True> value when the method is called on
106106
the object for the first time. Should return the invocant.
107107

doc/Type/Attribute.rakudoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ explicitly.
1717

1818
=head2 X<Trait is default|Traits,is default (Attribute)>
1919

20-
An attribute that is assigned L<Nil|/type/Nil> will revert to its default value
20+
An attribute that is assigned L<C<Nil>|/type/Nil> will revert to its default value
2121
set with the trait C<is default>. In the case of arrays or associatives, the
2222
argument of C<is default> will set the default item value or hash value.
2323

@@ -231,7 +231,7 @@ attributes marked as C<is rw>.
231231

232232
method required(Attribute:D: --> Any:D)
233233

234-
Returns C<1> for attributes that have the "is required" trait applied, or C<Mu>
234+
Returns C<1> for attributes that have the "is required" trait applied, or L<C<Mu>|/type/Mu>
235235
if the attribute did not have that trait applied. If the "is required" trait
236236
is applied with a string, then that string will be returned instead of C<1>.
237237

doc/Type/Backtrace/Frame.rakudoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ C<is hidden-from-backtrace> trait.
6666
method is-routine(Backtrace::Frame:D: --> Bool:D)
6767

6868
Return C<True> if the frame points into a routine (and not
69-
into a mere L<Block|/type/Block>).
69+
into a mere L<C<Block>|/type/Block>).
7070

7171
my $bt = Backtrace.new;
7272
my $btf = $bt[0];

doc/Type/CallFrame.rakudoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class CallFrame {}
88

9-
A CallFrame will be usually captured from the
9+
A C<CallFrame> will be usually captured from the
1010
current state of a program using the L<callframe|/routine/callframe> subroutine.
1111

1212
my $frame = callframe;
@@ -55,8 +55,8 @@ of the caller using the C<callframe> interface.
5555

5656
calling-frame;
5757

58-
If you just need to trace caller information, L<Backtrace|/type/Backtrace> may
59-
provide a better means of getting it. L<CallFrame|/type/CallFrame>
58+
If you just need to trace caller information, L<C<Backtrace>|/type/Backtrace> may
59+
provide a better means of getting it. C<CallFrame>
6060
contains more information about a specific frame, but provides a tedious
6161
interface for enumerating a call stack.
6262

@@ -78,7 +78,7 @@ my $frame;
7878
for ^3 { FIRST $frame = callframe; say $_ * 3 };
7979
say $frame.code()
8080

81-
The C<$frame> variable will hold the C<Code> for the block inside the loop in
81+
The C<$frame> variable will hold the L<C<Code>|/type/Code> for the block inside the loop in
8282
this case.
8383

8484
=head2 method file
@@ -105,7 +105,7 @@ following two calls are identical.
105105

106106
method annotations()
107107

108-
Returns a L<Map|/type/Map> containing the invocants annotations, i.e. C<line>
108+
Returns a L<C<Map>|/type/Map> containing the invocants annotations, i.e. C<line>
109109
and C<file>. An easier way to get hold of the annotation information is to use
110110
one of the convenience methods instead.
111111

@@ -116,7 +116,7 @@ one of the convenience methods instead.
116116

117117
method my()
118118

119-
Return a L<Hash|/type/Hash> that names all the variables and their values
119+
Return a L<C<Hash>|/type/Hash> that names all the variables and their values
120120
associated with the lexical scope of the frame.
121121

122122
sub some-value {
@@ -133,11 +133,11 @@ associated with the lexical scope of the frame.
133133

134134
sub callframe(Int:D $level = 0)
135135

136-
Returns a L<CallFrame|/type/CallFrame> object for the given level. If no level
136+
Returns a C<CallFrame> object for the given level. If no level
137137
is given, the default level is 0. Positive levels move up the frame stack and
138138
negative levels move down (into the call to C<callframe> and deeper).
139139

140-
Returns L<Mu|/type/Mu> if there is no call information for the given level.
140+
Returns L<C<Mu>|/type/Mu> if there is no call information for the given level.
141141
Negative levels may result in an exception.
142142

143143
=end pod

doc/Type/Channel.rakudoc

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Further examples can be found in the L<concurrency page|/language/concurrency#Ch
3232
method send(Channel:D: \item)
3333

3434
Enqueues an item into the C<Channel>. Throws an exception of type
35-
L<X::Channel::SendOnClosed|/type/X::Channel::SendOnClosed> if the channel has been
35+
L<C<X::Channel::SendOnClosed>|/type/X::Channel::SendOnClosed> if the C<Channel> has been
3636
closed already. This call will B<not> block waiting for a consumer to take the object.
3737
There is no set limit on the number of items that may be queued, so
3838
care should be taken to prevent runaway queueing.
@@ -47,15 +47,15 @@ care should be taken to prevent runaway queueing.
4747

4848
method receive(Channel:D:)
4949

50-
Receives and removes an item from the channel. It blocks if no item is
50+
Receives and removes an item from the C<Channel>. It blocks if no item is
5151
present, waiting for a C<send> from another thread.
5252

5353
Throws an exception of
54-
type L<X::Channel::ReceiveOnClosed|/type/X::Channel::ReceiveOnClosed> if the channel
54+
type L<C<X::Channel::ReceiveOnClosed>|/type/X::Channel::ReceiveOnClosed> if the C<Channel>
5555
has been closed, and the last item has been removed already, or if C<close> is called
5656
while C<receive> is waiting for an item to arrive.
5757

58-
If the channel has been marked as erratic with method C<fail>, and the last
58+
If the C<Channel> has been marked as erratic with method C<fail>, and the last
5959
item has been removed, throws the argument that was given to C<fail> as an
6060
exception.
6161

@@ -69,8 +69,8 @@ See method C<poll> for a non-blocking version that won't throw exceptions.
6969

7070
method poll(Channel:D:)
7171

72-
Receives and removes an item from the channel. If no item is present, returns
73-
C<Nil> instead of waiting.
72+
Receives and removes an item from the C<Channel>. If no item is present, returns
73+
L<C<Nil>|/type/Nil> instead of waiting.
7474

7575
my $c = Channel.new;
7676
Promise.in(2).then: { $c.close; }
@@ -81,21 +81,21 @@ C<Nil> instead of waiting.
8181
sleep 0.1;
8282
}
8383

84-
See method C<receive> for a blocking version that properly responds to channel
84+
See method C<receive> for a blocking version that properly responds to C<Channel>
8585
closing and failure.
8686

8787
=head2 method close
8888

8989
method close(Channel:D:)
9090

9191
Close the C<Channel>, normally. This makes subsequent C<send> calls die with
92-
L<X::Channel::SendOnClosed|/type/X::Channel::SendOnClosed>. Subsequent calls of
92+
L<C<X::Channel::SendOnClosed>|/type/X::Channel::SendOnClosed>. Subsequent calls of
9393
C<.receive> may still drain any remaining items that were previously sent, but if
94-
the queue is empty, will throw an L<X::Channel::ReceiveOnClosed|/type/X::Channel::ReceiveOnClosed>
95-
exception. Since you can produce a C<Seq> from a Channel by contextualizing to array with C<@()>
96-
or by calling the C<.list> method, these methods will not terminate until the channel has been
94+
the queue is empty, will throw an L<C<X::Channel::ReceiveOnClosed>|/type/X::Channel::ReceiveOnClosed>
95+
exception. Since you can produce a L<C<Seq>|/type/Seq> from a C<Channel> by contextualizing to array with C<@()>
96+
or by calling the C<.list> method, these methods will not terminate until the C<Channel> has been
9797
closed. A L<whenever|/language/concurrency#index-entry-whenever>-block will also
98-
terminate properly on a closed channel.
98+
terminate properly on a closed C<Channel>.
9999

100100
=for code
101101
my $c = Channel.new;
@@ -112,7 +112,7 @@ phaser to enforce the C<.close> call in this case.
112112

113113
method list(Channel:D:)
114114

115-
Returns a list based on the C<Seq> which will iterate items in the queue and
115+
Returns a list based on the L<C<Seq>|/type/Seq> which will iterate items in the queue and
116116
remove each item from it as it iterates. This can only terminate once the
117117
C<close> method has been called.
118118

@@ -124,7 +124,7 @@ C<close> method has been called.
124124

125125
method closed(Channel:D: --> Promise:D)
126126

127-
Returns a promise that will be kept once the channel is closed by a call to
127+
Returns a promise that will be kept once the C<Channel> is closed by a call to
128128
method C<close>.
129129

130130
my $c = Channel.new;
@@ -137,8 +137,8 @@ method C<close>.
137137
method fail(Channel:D: $error)
138138

139139
Closes the C<Channel> (that is, makes subsequent C<send> calls die), and enqueues
140-
the error to be thrown as the final element in the channel. Method C<receive>
141-
will throw that error as an exception. Does nothing if the channel has already
140+
the error to be thrown as the final element in the C<Channel>. Method C<receive>
141+
will throw that error as an exception. Does nothing if the C<Channel> has already
142142
been closed or C<.fail> has already been called on it.
143143

144144
my $c = Channel.new;
@@ -158,8 +158,8 @@ on the invocant.
158158

159159
method Supply(Channel:D:)
160160

161-
This returns an C<on-demand> L<Supply|/type/Supply> that emits a value for every value
162-
received on the Channel. C<done> will be called on the C<Supply> when the L<Channel|/type/Channel>
161+
This returns an C<on-demand> L<C<Supply>|/type/Supply> that emits a value for every value
162+
received on the C<Channel>. C<done> will be called on the L<C<Supply>|/type/Supply> when the C<Channel>
163163
is closed.
164164

165165
my $c = Channel.new;
@@ -171,16 +171,16 @@ is closed.
171171
sleep 1;
172172

173173
Multiple calls to this method produce multiple instances of Supply, which compete
174-
over the values from the Channel.
174+
over the values from the C<Channel>.
175175

176176
=head2 sub await
177177

178178
multi sub await(Channel:D)
179179
multi sub await(*@)
180180

181-
Waits until all of one or more channels has a value available, and returns
182-
those values (it calls C<.receive> on the channel). Also works with
183-
L<promises|/type/Promise>.
181+
Waits until all of one or more C<Channel>s has a value available, and returns
182+
those values (it calls C<.receive> on the C<Channel>). Also works with
183+
L<C<Promise>|/type/Promise>s.
184184

185185
my $c = Channel.new;
186186
Promise.in(1).then({$c.send(1)});

doc/Type/Code.rakudoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ result of the call is returned.
2828

2929
Returns the minimum number of positional arguments that must be passed
3030
in order to call the code object. Any optional or slurpy parameters in the
31-
code object's C<Signature> do not contribute, nor do named parameters.
31+
code object's L<C<Signature>|/type/Signature> do not contribute, nor do named parameters.
3232

3333
sub argless() { }
3434
sub args($a, $b?) { }
@@ -41,7 +41,7 @@ code object's C<Signature> do not contribute, nor do named parameters.
4141

4242
method assuming(Callable:D $self: |primers)
4343

44-
Returns a new C<Callable> that has been L<primed|/language/glossary#priming>
44+
Returns a new L<C<Callable>|/type/Callable> that has been L<primed|/language/glossary#priming>
4545
with the arguments passed to C<assuming>. In other words, the new function
4646
implements the same behavior as the original, but has the values passed to
4747
C<.assuming> already bound to the corresponding parameters.
@@ -134,7 +134,7 @@ its parameters.
134134
method cando(Capture $c)
135135

136136
Returns a list of candidates that can be called with the given
137-
L<Capture|/type/Capture>. Since C<Code> objects do not have any multiple
137+
L<C<Capture>|/type/Capture>. Since C<Code> objects do not have any multiple
138138
dispatch, this either returns a list with the object, or an empty list.
139139

140140
my $single = \'a'; # a single argument Capture

doc/Type/CompUnit.rakudoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Returns the authority information with which the C<CompUnit> object was created
2323

2424
method distribution(--> Distribution:D)
2525

26-
Returns the L<Distribution|/type/Distribution> object with which the C<CompUnit> object was
26+
Returns the L<C<Distribution>|/type/Distribution> object with which the C<CompUnit> object was
2727
created (if any).
2828

2929
=head2 method from
@@ -43,7 +43,7 @@ Returns whether the C<CompUnit> object originated from a precompiled source.
4343

4444
method repo(--> CompUnit::Repository:D)
4545

46-
Returns the L<CompUnit::Repository|/type/CompUnit::Repository> object with which the C<CompUnit> object
46+
Returns the L<C<CompUnit::Repository>|/type/CompUnit::Repository> object with which the C<CompUnit> object
4747
was created.
4848

4949
=head2 method repo-id

doc/Type/ComplexStr.rakudoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ say 42+0i ∈ <42+0i 55 1>; # OUTPUT: «False␤»
2929

3030
method new(Complex $i, Str $s)
3131

32-
The constructor requires both the C<Complex> and the C<Str> value, when constructing one
32+
The constructor requires both the L<C<Complex>|/type/Complex> and the L<C<Str>|/type/Str> value, when constructing one
3333
directly the values can be whatever is required:
3434

3535
my $f = ComplexStr.new(42+0i, "forty two (but complicated)");
@@ -46,7 +46,7 @@ Equivalent to L«C<Mu.Capture>|/type/Mu#method_Capture».
4646

4747
method Complex
4848

49-
Returns the C<Complex> value of the C<ComplexStr>.
49+
Returns the L<C<Complex>|/type/Complex> value of the C<ComplexStr>.
5050

5151
=head2 method Numeric
5252

@@ -61,9 +61,9 @@ a warning about using an uninitialized value in numeric context and then returns
6161
multi method Real(ComplexStr:D: --> Num:D)
6262
multi method Real(ComplexStr:U: --> Num:D)
6363

64-
Coerces the numeric portion of the invocant to L<Num|/type/Num>. If the imaginary part
64+
Coerces the numeric portion of the invocant to L<C<Num>|/type/Num>. If the imaginary part
6565
isn't L<approximately|/routine/=~=> zero,
66-
coercion L<fails|/routine/fail> with C<X::Numeric::Real>.
66+
coercion L<fails|/routine/fail> with L<C<X::Numeric::Real>|/type/X::Numeric::Real>.
6767

6868
The C<:D> variant returns the result of that coercion. The C<:U> variant issues
6969
a warning about using an uninitialized value in numeric context and then returns value C<0e0>.
@@ -74,8 +74,8 @@ a warning about using an uninitialized value in numeric context and then returns
7474

7575
multi sub infix:<===>(ComplexStr:D $a, ComplexStr:D $b)
7676

77-
C<ComplexStr> Value identity operator. Returns C<True> if the C<Complex>
78-
values of C<$a> and C<$b> are L<identical|/routine/===> and their C<Str>
77+
C<ComplexStr> Value identity operator. Returns C<True> if the L<C<Complex>|/type/Complex>
78+
values of C<$a> and C<$b> are L<identical|/routine/===> and their L<C<Str>|/type/Str>
7979
values are also L<identical|/routine/===>. Returns C<False> otherwise.
8080

8181
=end pod

0 commit comments

Comments
 (0)