From 50e1f104a71a28328f131eba0db3abfec8dfa2e4 Mon Sep 17 00:00:00 2001 From: "Will \"Coke\" Coleda" Date: Thu, 13 Oct 2016 10:18:53 -0400 Subject: [PATCH 1/2] improve readability of diag output in example --- doc/Type/Signature.pod6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Type/Signature.pod6 b/doc/Type/Signature.pod6 index 40e3b3256..27c7200b8 100644 --- a/doc/Type/Signature.pod6 +++ b/doc/Type/Signature.pod6 @@ -195,8 +195,8 @@ use the C<:D> type constraint. sub limit-lines(Str:D $s, Int $limit) { }; say limit-lines Str, 3; - CATCH { default { put .^name, .Str } }; - # OUTPUT«X::AdHocParameter '$s' requires an instance of type Str, but a + CATCH { default { put .^name ~ '--' ~~ .Str } }; + # OUTPUT«X::AdHoc--Parameter '$s' requires an instance of type Str, but a # type object was passed. Did you forget a .new?» This is much better than the way the program failed before, since here the From 0bd58495a76a60aea5d8da4e68f87261a940355a Mon Sep 17 00:00:00 2001 From: "Will \"Coke\" Coleda" Date: Thu, 13 Oct 2016 10:26:58 -0400 Subject: [PATCH 2/2] fix typos --- doc/Language/concurrency.pod6 | 2 +- doc/Language/nativecall.pod6 | 2 +- doc/Language/quoting.pod6 | 2 +- doc/Language/rb-nutshell.pod6 | 2 +- doc/Language/traps.pod6 | 2 +- doc/Language/typesystem.pod6 | 4 ++-- doc/Type/X/Proc/Async.pod6 | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/Language/concurrency.pod6 b/doc/Language/concurrency.pod6 index 0a81d051d..dd6c09ebf 100644 --- a/doc/Language/concurrency.pod6 +++ b/doc/Language/concurrency.pod6 @@ -645,7 +645,7 @@ the thread completes: $thread.finish; Beyond that there are no further facilities for synchronization or resource -sharing which is largely why it should be emphasised that threads are unlikely +sharing which is largely why it should be emphasized that threads are unlikely to be useful directly in user code. =head2 Schedulers diff --git a/doc/Language/nativecall.pod6 b/doc/Language/nativecall.pod6 index 832eb45b5..157f1cca7 100644 --- a/doc/Language/nativecall.pod6 +++ b/doc/Language/nativecall.pod6 @@ -464,7 +464,7 @@ Note that at the moment it's not as tested and developed as C support. =head1 Helper Functions The C library exports several subroutines to help you work with -data fron native libraries. +data from native libraries. =head2 sub X diff --git a/doc/Language/quoting.pod6 b/doc/Language/quoting.pod6 index 724e6c5a6..ff0b226c1 100644 --- a/doc/Language/quoting.pod6 +++ b/doc/Language/quoting.pod6 @@ -148,7 +148,7 @@ You can also use unicode names with C<\c[]>. OUTPUT«Str $s = "Str $s = "Camelia 💔 my ❤!"␤» Interpolation of undefined values will raise a control exception that can be -cought in the current block with +caught in the current block with L. sub niler {Nil}; diff --git a/doc/Language/rb-nutshell.pod6 b/doc/Language/rb-nutshell.pod6 index bd6a1a3b7..4426c04a0 100644 --- a/doc/Language/rb-nutshell.pod6 +++ b/doc/Language/rb-nutshell.pod6 @@ -921,7 +921,7 @@ will be available If you tries to use C an "Undeclared routine" error is raised at compile time. -Some modules allow for selectively importing funcitons, which would look like: +Some modules allow for selectively importing functions, which would look like: use Bar ; # Import only foo foo(1); #=> "foo 1" diff --git a/doc/Language/traps.pod6 b/doc/Language/traps.pod6 index d064f5643..c3dc2dac6 100644 --- a/doc/Language/traps.pod6 +++ b/doc/Language/traps.pod6 @@ -457,7 +457,7 @@ can be shortened to just for 1..8 { say $^a + $^b; } -The trouble arises when a person wants to use more complex names for the variables, instead of just one letter. The C<^> twigil is able to have the positional variables be out of order and named whatever you want, but assigns values based on the variable's Unicode ordering. In the above example, we can have C<$^a> and C<$^b> switch places, and those variables will keep their positional values. This is beacuse the Unicode character 'a' comes before the character 'b'. For example: +The trouble arises when a person wants to use more complex names for the variables, instead of just one letter. The C<^> twigil is able to have the positional variables be out of order and named whatever you want, but assigns values based on the variable's Unicode ordering. In the above example, we can have C<$^a> and C<$^b> switch places, and those variables will keep their positional values. This is because the Unicode character 'a' comes before the character 'b'. For example: #In order sub f1 { say "$^first $^second"; } diff --git a/doc/Language/typesystem.pod6 b/doc/Language/typesystem.pod6 index 851b7a7d1..700e837e5 100644 --- a/doc/Language/typesystem.pod6 +++ b/doc/Language/typesystem.pod6 @@ -39,7 +39,7 @@ L and L. Please note that any object is able to overload C<.defined> and as such can carry additional information. Also, Perl 6 makes a clear distinction between definedness and trueness. Many values are defined even though they carry the meaning of wrongness or -emtpyness. Such values are C<0>, L, +emptiness. Such values are C<0>, L, L<()|/language/operators#term_(_)> (empty list) and L. Values can become undefined at runtime via L. @@ -214,7 +214,7 @@ C<:&attr-with-code-in-it>, and so on. =head4 trait C -Mark a method for hyperoperators as to be avoided for decending into. +Mark a method for hyperoperators as to be avoided for descending into. dd [[1,2,3],[4,5]]>>.elems; # OUTPUT«(3, 2)␤» diff --git a/doc/Type/X/Proc/Async.pod6 b/doc/Type/X/Proc/Async.pod6 index 5e25e26c0..e3d9d741d 100644 --- a/doc/Type/X/Proc/Async.pod6 +++ b/doc/Type/X/Proc/Async.pod6 @@ -12,7 +12,7 @@ All exceptions thrown by L do this common role. =head2 method proc - method fproc(X::Proc::Async:D) returns Proc::Async + method proc(X::Proc::Async:D) returns Proc::Async Returns the object that threw the exception.