Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
coke committed Oct 13, 2016
1 parent 025a6cd commit c33a4cc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions doc/Language/variables.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ re-applied by assigning C<Nil> to it:
=head2 Default Defined Variables Pragma
To force all variables to have a definedness contraint use the prama C<use
To force all variables to have a definedness constraint use the prama C<use
variables :D>. The pragma is lexically scoped and can be switched of with C<use
variables :_>.
Expand All @@ -889,7 +889,7 @@ my Int $i = 1; # that works
Please note that assigning L<Nil|/type/Nil> will revert the variable to it's
default value. The default value of a defined constraint type is the type
appended with C<:D> (e.g. C<Int:D>). That means a definedness contraint is no
appended with C<:D> (e.g. C<Int:D>). That means a definedness constraint is no
guarantee of definedness. This only applies to variable initializers, not to
L<Signature|/type/Signature>s. or subsequent assignments to a variable.
Expand Down
4 changes: 2 additions & 2 deletions doc/Type/Exception.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ return the exception message.
Special care should be taken that this method does not produce
an exception itself.
try die "Something bad happend";
try die "Something bad happened";
if ($!) {
say $!.message; # Something bad happened.
}
Expand All @@ -48,7 +48,7 @@ Defined as:
Returns the backtrace associated with the exception. Only makes sense
on exceptions that have been thrown at least once.
try die "Something bad happend";
try die "Something bad happened";
if ($!) {
say $!.backtrace;
}
Expand Down
4 changes: 2 additions & 2 deletions doc/Type/Hash.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ Note that with objects as keys, you cannot access non-string keys as strings:
:{ -1 => 41, 0 => 42, 1 => 43 }<0>; # Any
:{ -1 => 41, 0 => 42, 1 => 43 }{0}; # 42
=head2 Contraint value types
=head2 Constraint value types
Place a type object inbetween the declarator and the name to contraint the type
Place a type object in-between the declarator and the name to constraint the type
of all values of a C<Hash>. Use a L<subset|/language/typesystem#subset> for
constraints with a where-clause.
Expand Down
2 changes: 1 addition & 1 deletion doc/Type/IO/Handle.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ on strings.
=for code :skip-test
my $fh = open 'path/to/file', :r;
$fn.split(' ', close => True); # Returns file content splitted by a space and closes file;
$fn.split(' ', close => True); # Returns file content split by a space and closes file;
=head2 method comb
Expand Down
2 changes: 1 addition & 1 deletion doc/Type/Nil.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type container will fail with a runtime error.
$x.say; # (Int)
sub f( --> Int:D ){ Nil }; # this definedness constraint is ignored
my Int:D $i = f; # this definedness contraint is not ignored, so throws
my Int:D $i = f; # this definedness constraint is not ignored, so throws
CATCH { default { put .^name, ': ', .Str } };
# OUTPUT: «X::TypeCheck::Assignment: Type check failed in assignment to $y; expected Int but got Any (Any)»
Expand Down

0 comments on commit c33a4cc

Please sign in to comment.