Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Big signature return type unification.
This commit affects all signatures that exist in the type documentation: it replaces "returns " occurences with "-->" form.

See #1024 (comment) for explanations.
  • Loading branch information
Altai-man committed Dec 5, 2016
1 parent 138cd60 commit 1308514
Show file tree
Hide file tree
Showing 124 changed files with 758 additions and 756 deletions.
16 changes: 8 additions & 8 deletions doc/Type/Any.pod6
Expand Up @@ -36,7 +36,7 @@ Many built-in types override this for more specific comparisons
Defined as:
method any() returns Junction:D
method any(--> Junction:D)
Interprets the invocant as a list and creates an
C<any>-L<Junction|/type/Junction> from it.
Expand All @@ -48,7 +48,7 @@ C<any>-L<Junction|/type/Junction> from it.
Defined as:
method all() returns Junction:D
method all(--> Junction:D)
Interprets the invocant as a list and creates an
C<all>-L<Junction|/type/Junction> from it.
Expand All @@ -60,7 +60,7 @@ C<all>-L<Junction|/type/Junction> from it.
Defined as:
method one() returns Junction:D
method one(--> Junction:D)
Interprets the invocant as a list and creates a
C<one>-L<Junction|/type/Junction> from it.
Expand All @@ -72,7 +72,7 @@ C<one>-L<Junction|/type/Junction> from it.
Defined as:
method none() returns Junction:D
method none(--> Junction:D)
Interprets the invocant as a list and creates a
C<none>-L<Junction|/type/Junction> from it.
Expand Down Expand Up @@ -103,8 +103,8 @@ into the newly created Array.
Defined as:
multi sub reverse(*@list ) returns List:D
multi method reverse(List:D:) returns List:D
multi sub reverse(*@list --> List:D)
multi method reverse(List:D: --> List:D)
Returns a list with the same elements in reverse order.
Expand Down Expand Up @@ -150,7 +150,7 @@ occur over C<(SELF,)> (if C<:$item> is set) or C<SELF>.
Defined as:
method deepmap(&block) returns List is nodal
method deepmap(&block --> List) is nodal
C<deepmap> will apply C<&block> to each element and return a new C<List> with
the return values of C<&block>, unless the element does the C<Iterable> role.
Expand Down Expand Up @@ -223,7 +223,7 @@ Interprets the invocant as a list, and returns the last index of that list.
=head2 method pairup
method pairup() returns List
method pairup(--> List)
Interprets the invocant as a list, and constructs a list of
L<pairs|/type/Pair> from it, in the same way that assignment to a
Expand Down
12 changes: 6 additions & 6 deletions doc/Type/Array.pod6
Expand Up @@ -36,8 +36,8 @@ Example:
Defined as:
multi sub push(Array:D, **@values) returns Array:D
multi method push(Array:D: **@values) returns Array:D
multi sub push(Array:D, **@values --> Array:D)
multi method push(Array:D: **@values --> Array:D)
Adds the C<@values> to the end of the array, and returns the modified list.
Fails for infinite arrays.
Expand Down Expand Up @@ -116,8 +116,8 @@ Example:
Defined as:
multi sub unshift(Array:D, **@values) returns Array:D
multi method unshift(Array:D: **@values) returns Array:D
multi sub unshift(Array:D, **@values --> Array:D)
multi method unshift(Array:D: **@values --> Array:D)
Adds the C<@values> to the start of the array, and returns the modified array.
Fails if C<@values> is infinite.
Expand Down Expand Up @@ -157,8 +157,8 @@ Example:
Defined as:
multi sub splice(@list, $start, $elems?, *@replacement) returns Array
multi method splice(Array:D $start, $elems?, *@replacement) returns Array
multi sub splice(@list, $start, $elems?, *@replacement --> Array)
multi method splice(Array:D $start, $elems?, *@replacement --> Array)
Deletes C<$elems> elements starting from index C<$start> from the C<Array>,
returns them and replaces them by C<@replacement>. If C<$elems> is omitted,
Expand Down
10 changes: 5 additions & 5 deletions doc/Type/Attribute.pod6
Expand Up @@ -36,7 +36,7 @@ The usual way to obtain an object of type C<Attribute> is by introspection:
Defined as:
method name(Attribute:D:) returns Str:D
method name(Attribute:D: --> Str:D)
Returns the name of the attribute. Note that this is always the private name,
so if an attribute is declared as C<has $.a>, the name returned is C<$!a>.
Expand All @@ -51,7 +51,7 @@ so if an attribute is declared as C<has $.a>, the name returned is C<$!a>.
Defined as:
method package(Attribute:D:) returns Mu:U
method package(Attribute:D: --> Mu:U)
Returns the package (class/grammar/role) to which this attribute belongs.
Expand All @@ -65,7 +65,7 @@ Returns the package (class/grammar/role) to which this attribute belongs.
Defined as:
method has_accessor(Attribute:D:) returns Bool:D
method has_accessor(Attribute:D: --> Bool:D)
Returns C<True> if the attribute has a public accessor method.
Expand All @@ -82,7 +82,7 @@ Returns C<True> if the attribute has a public accessor method.
Defined as:
method readonly(Attribute:D:) returns Bool:D
method readonly(Attribute:D: --> Bool:D)
Returns C<True> for readonly attributes, which is the default.
Returns C<False> for attributes marked as C<is rw>.
Expand All @@ -100,7 +100,7 @@ Returns C<False> for attributes marked as C<is rw>.
Defined as:
method type(Attribute:D:) returns Mu
method type(Attribute:D: --> Mu)
Returns the type constraint of the attribute.
Expand Down
12 changes: 6 additions & 6 deletions doc/Type/Backtrace/Frame.pod6
Expand Up @@ -14,7 +14,7 @@ A single backtrace frame. It identifies a location in the source code.
Defined as:
method file(Backtrace::Frame:D) returns Str
method file(Backtrace::Frame:D --> Str)
Returns the file name.
Expand All @@ -26,7 +26,7 @@ Returns the file name.
Defined as:
method line(Backtrace::Frame:D) returns Int
method line(Backtrace::Frame:D --> Int)
Returns the line number (line numbers start to count from 1).
Expand All @@ -50,7 +50,7 @@ Returns the code object into which C<.file> and C<.line> point, if available.
Defined as:
method subname(Backtrace::Frame:D) returns Str
method subname(Backtrace::Frame:D --> Str)
Returns the name of the enclosing subroutine.
Expand All @@ -62,7 +62,7 @@ Returns the name of the enclosing subroutine.
Defined as:
method is-hidden(Backtrace::Frame:D) returns Bool:D
method is-hidden(Backtrace::Frame:D --> Bool:D)
Returns C<True> if the frame is marked as hidden with the
C<is hidden-from-backtrace> trait.
Expand All @@ -75,7 +75,7 @@ C<is hidden-from-backtrace> trait.
Defined as:
method is-routine(Backtrace::Frame:D) returns Bool:D
method is-routine(Backtrace::Frame:D --> Bool:D)
Return C<True> if the frame point into a routine (and not
into a mere L<Block>).
Expand All @@ -88,7 +88,7 @@ into a mere L<Block>).
Defined as:
method is-setting(Backtrace::Frame:D) returns Bool:D
method is-setting(Backtrace::Frame:D --> Bool:D)
Returns C<True> if the frame is part of a setting.
Expand Down
2 changes: 1 addition & 1 deletion doc/Type/Bag.pod6
Expand Up @@ -97,7 +97,7 @@ with detailed explanations.
=head2 sub bag
sub bag(*@args) returns Bag
sub bag(*@args --> Bag)
Creates a new C<Bag> from C<@args>.
Expand Down

0 comments on commit 1308514

Please sign in to comment.