=head1 NAME

B<trash> -- move files/folders to the trash

=head1 SYNOPSIS

=over 10

=item B<trash>

[B<-vles>] I<file> I<...>

=back

=head1 DESCRIPTION

B<trash> moves the specified files and/or folders to the system trash.

The options are as follows:

=over 12

=item B<-v>

Be verbose when moving items to the trash, showing them as they are moved.

=item B<-l>

List items currently in the trash. If this argument is used, no files need to be specified.

=item B<-e>

Empty the trash. B<trash> asks for confirmation before executing this action. If this argument is used, no files need to be specified.

=item B<-s>

Securely empty the trash. B<trash> asks for confirmation before executing this action. If this argument is used, no files need to be specified.

=head1 SEE ALSO

rm(1)

=head1 AUTHORS

This man page has been written by Ali Rantakari (http://hasseg.org)

Fix missing =back element in man page POD file.


=begin pod

X<DESTROY>

=TITLE role Metamodel::Finalization

=SUBTITLE Metamodel role for finalization / destroyer method

    role Metamodel::Finalization { ... }

This role takes care that C<DESTROY> submethods are called (if they exist)
when an object is garbage-collected.

=head1 Methods

=head2 method setup_finalization

    method setup_finalization(Metamodel::Finalization:D: $obj)

Collects the C<DESTROY> submethods from this class and all its superclasses,
and marks the class as needing action on garbage collection.

A metamodel for a kind that implements finalization semantics must call this method
at type composition time.

=head2 method destroyers

    method destroyers(Metamodel::Finalization:D: $obj) returns List:D

Returns a list of all finalization methods.

=end pod

Move X<DESTROY> into documentation body

=begin pod

=TITLE role Metamodel::Finalization

=SUBTITLE Metamodel role for finalization / destroyer method

X<DESTROY>

    role Metamodel::Finalization { ... }

This role takes care that C<DESTROY> submethods are called (if they exist)
when an object is garbage-collected.

=head1 Methods

=head2 method setup_finalization

    method setup_finalization(Metamodel::Finalization:D: $obj)

Collects the C<DESTROY> submethods from this class and all its superclasses,
and marks the class as needing action on garbage collection.

A metamodel for a kind that implements finalization semantics must call this method
at type composition time.

=head2 method destroyers

    method destroyers(Metamodel::Finalization:D: $obj) returns List:D

Returns a list of all finalization methods.

=end pod


=head1 NAME

millsyn - Mill syntax

=head1 DESCRIPTION

Mill has a syntax.

=head2 Variables

A variable is defined using the C<let> keyword, for example:

    let food = "orange"
    let (source, age) = ("orange tree", months(1))

Variables defined with C<let> are immutable unless their names start with C<$>
or C<%>:

    let food = "orange"
    let $age = months(1)
    let %rotten = false
    food = "apple" # error: attempt to assign immutable variable
    $age = $age + years(1) # ok
    %rotten = true # ok

The difference between C<$> and C<%> is that when the name of a variable starts
with C<%>, its value is reset at the end of the scope:

    let ($a, %b) = (1, 2)
    {
        $a = 3
        %b = 4
    }
    p($a) # prints 3
    p(%b) # prints 2

=cut

Clarify exceptions wrt dynamic variables

=head1 NAME

millsyn - Mill syntax

=head1 DESCRIPTION

Mill has a syntax.

=head2 Variables

A variable is defined using the C<let> keyword, for example:

    let food = "orange"
    let (source, age) = ("orange tree", months(1))

Variables defined with C<let> are immutable unless their names start with C<$>
or C<%>:

    let food = "orange"
    let $age = months(1)
    let %rotten = false
    food = "apple" # error: attempt to assign immutable variable
    $age = $age + years(1) # ok
    %rotten = true # ok

The difference between C<$> and C<%> is that when the name of a variable starts
with C<%>, its value is reset at the end of the scope:

    let ($a, %b) = (1, 2)
    {
        $a = 3
        %b = 4
    }
    p($a) # prints 3
    p(%b) # prints 2

The value is reset even when an exception is thrown before the end of the scope
is reached.

=cut


=pod

=head1 NAME

SSL_CTX_use_serverinfo, SSL_CTX_use_serverinfo_file

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
                            size_t serverinfo_length);

 int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file);

=head1 DESCRIPTION

These functions load "serverinfo" TLS ServerHello Extensions into the SSL_CTX.
A "serverinfo" extension is returned in response to an empty ClientHello
Extension.

SSL_CTX_use_serverinfo_file() loads one or more serverinfo extensions from
a byte array into B<ctx>. The extensions must be concatenated into a
sequence of bytes.  Each extension must consist of a 2-byte Extension Type,
a 2-byte length, and then length bytes of extension_data.

SSL_CTX_use_serverinfo_file() loads one or more serverinfo extensions from
B<file> into B<ctx>. The extensions must be in PEM format.  Each extension
must consist of a 2-byte Extension Type, a 2-byte length, and then length
bytes of extension_data.

=head1 NOTES

=head1 RETURN VALUES

On success, the functions return 1.
On failure, the functions return 0.  Check out the error stack to find out
the reason.

=head1 SEE ALSO

=head1 HISTORY

=cut

Update docs to mention "BEGIN SERVERINFO FOR ".

=pod

=head1 NAME

SSL_CTX_use_serverinfo, SSL_CTX_use_serverinfo_file

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
                            size_t serverinfo_length);

 int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file);

=head1 DESCRIPTION

These functions load "serverinfo" TLS ServerHello Extensions into the SSL_CTX.
A "serverinfo" extension is returned in response to an empty ClientHello
Extension.

SSL_CTX_use_serverinfo_file() loads one or more serverinfo extensions from
a byte array into B<ctx>.  The extensions must be concatenated into a
sequence of bytes.  Each extension must consist of a 2-byte Extension Type,
a 2-byte length, and then length bytes of extension_data.

SSL_CTX_use_serverinfo_file() loads one or more serverinfo extensions from
B<file> into B<ctx>.  The extensions must be in PEM format.  Each extension
must consist of a 2-byte Extension Type, a 2-byte length, and then length
bytes of extension_data.  Each PEM extension name must begin with the phrase
"BEGIN SERVERINFO FOR ".

=head1 NOTES

=head1 RETURN VALUES

On success, the functions return 1.
On failure, the functions return 0.  Check out the error stack to find out
the reason.

=head1 SEE ALSO

=head1 HISTORY

=cut


=head1 NAME

Alien::FLTK::Todo - TODO list for Perl module Alien::FLTK

=head1 High priorities

=over

=item * None yet.

=back

=head1 Short term goals

=over

=item * None yet.

=back

=head1 Long term goals

=over

=item * None yet.

=back

=head1 Author

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

CPAN ID: SANKO

=head1 License and Legal

Copyright (C) 2009 by Sanko Robinson E<lt>sanko@cpan.orgE<gt>

=for git $Id$ for got=

=cut

Correct dist name in docs

=head1 NAME

Alien::FLTK2::Todo - TODO list for Perl module Alien::FLTK2

=head1 High priorities

=over

=item * None yet.

=back

=head1 Short term goals

=over

=item * None yet.

=back

=head1 Long term goals

=over

=item * None yet.

=back

=head1 Author

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

CPAN ID: SANKO

=head1 License and Legal

Copyright (C) 2009 by Sanko Robinson E<lt>sanko@cpan.orgE<gt>

=for git $Id$ for got=

=cut


=pod

=encoding utf8

=head1 NAME

App-OnePif - Read 1Password Interchange Format exports

=head1 VERSION

This document describes App-OnePif version {{[ version ]}}.

=head1 SYNOPSIS

   use App-OnePif;

=head1 DESCRIPTION

This module allows you to...

=head1 FUNCTIONS

=head2 B<< whatever >>

=head1 METHODS

=head2 B<< whatever >>

=head1 BUGS AND LIMITATIONS

Report bugs either through RT or GitHub (patches welcome).

=head1 SEE ALSO

Foo::Bar.

=head1 AUTHOR

Flavio Poletti <polettix@cpan.org>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2016 by Flavio Poletti <polettix@cpan.org>

This module is free software. You can redistribute it and/or modify it
under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.

=cut

Set correct module name in POD

=pod

=encoding utf8

=head1 NAME

App::OnePif - Read 1Password Interchange Format exports

=head1 VERSION

This document describes App::OnePif version {{[ version ]}}.

=head1 SYNOPSIS

   use App::OnePif;

=head1 DESCRIPTION

This module allows you to...

=head1 FUNCTIONS

=head2 B<< whatever >>

=head1 METHODS

=head2 B<< whatever >>

=head1 BUGS AND LIMITATIONS

Report bugs either through RT or GitHub (patches welcome).

=head1 SEE ALSO

Foo::Bar.

=head1 AUTHOR

Flavio Poletti <polettix@cpan.org>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2016 by Flavio Poletti <polettix@cpan.org>

This module is free software. You can redistribute it and/or modify it
under the terms of the Artistic License 2.0.

This program is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.

=cut


=pod

=head1 NAME

SSL_get_extms_support - extended master secret support

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 int SSL_get_extms_support(SSL *ssl);

=head1 DESCRIPTION

SSL_get_extms_support() indicates whether the current session used extended
master secret.

This function is implemented as a macro.

=head1 RETURN VALUES

SSL_get_extms_support() returns 1 if the current session used extended
master secret, 0 if it did not and -1 if a handshake is currently in
progress i.e. it is not possible to determine if extended master secret
was used.

=back

=head1 SEE ALSO

L<ssl(3)|ssl(3)>

=cut

Remove stray "=back". This was causing newer versions of pod2man to choke.

=pod

=head1 NAME

SSL_get_extms_support - extended master secret support

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 int SSL_get_extms_support(SSL *ssl);

=head1 DESCRIPTION

SSL_get_extms_support() indicates whether the current session used extended
master secret.

This function is implemented as a macro.

=head1 RETURN VALUES

SSL_get_extms_support() returns 1 if the current session used extended
master secret, 0 if it did not and -1 if a handshake is currently in
progress i.e. it is not possible to determine if extended master secret
was used.

=head1 SEE ALSO

L<ssl(3)|ssl(3)>

=cut


# Copyright (C) 2007, The Perl Foundation.
# $Id: fhs.pod 18563 2007-05-16 00:53:55Z chromatic $

=pod

=head1 TITLE

The Headerizer

=head1 AUTHOR

Andy Lester C<< andy@petdance.com >>

=head1 INTRODUCTION

The Headerizer (F<tools/build/headerizer.pl>) is a tool that generates
chunks of F<.h> header files based on C source code.

The long-term plan for the headerizer is that it will take all
the prototypes for all the functions and populate all the .h files
automatically.  No need to worry about differences between header and
source, because the header comes from it.  It'll also auto-generate
attributes for each of the functions that work with GCC.

=head1 RUNNING THE HEADERIZER

Yesterday there was a problem where I forgot to put PARROT_API on the
function in source, so linking on Windows broke.  If that happens again,
here's what you do:

* Run Configure.pl
* Update the source with PARROT_API above the return type
* Run "make headerizer"

The .h file should now have PARROT_API for the function in question.

Set some SVN file properties.

# Copyright (C) 2007, The Perl Foundation.
# $Id$

=pod

=head1 TITLE

The Headerizer

=head1 AUTHOR

Andy Lester C<< andy@petdance.com >>

=head1 INTRODUCTION

The Headerizer (F<tools/build/headerizer.pl>) is a tool that generates
chunks of F<.h> header files based on C source code.

The long-term plan for the headerizer is that it will take all
the prototypes for all the functions and populate all the .h files
automatically.  No need to worry about differences between header and
source, because the header comes from it.  It'll also auto-generate
attributes for each of the functions that work with GCC.

=head1 RUNNING THE HEADERIZER

Yesterday there was a problem where I forgot to put PARROT_API on the
function in source, so linking on Windows broke.  If that happens again,
here's what you do:

* Run Configure.pl
* Update the source with PARROT_API above the return type
* Run "make headerizer"

The .h file should now have PARROT_API for the function in question.


# $Id$

=head1 TITLE

Using Parrot m4

=head1 What is Parrot m4?

C<Parrot m4> is C<GNU m4> ported to C<Parrot>. It is implemented in the
Parrot Intermediate Representation (C<PIR>).
GNU m4, and thus Parrot m4, is a macro processor.

=head2 Installing Parrot m4

Get the Parrot distribution. Build parrot.
  cd languages/m4
  make

=head1 Running the test suite

  make test

=head1 Running your own code

  ../../parrot m4.pbc <options> <file.m4>

=head2 Command line arguments

  ../../parrot m4.pbc --help

=head2 A simple example

=head1 SEE ALSO

=head1 AUTHOR

Bernhard Schmalhofer - L<Bernhard.Schmalhofer@gmx.de>

=cut

Clean up all POD errors and many POD warnings.

# $Id$

=head1 TITLE

Using Parrot m4

=head1 What is Parrot m4?

C<Parrot m4> is C<GNU m4> ported to C<Parrot>. It is implemented in the
Parrot Intermediate Representation (C<PIR>).
GNU m4, and thus Parrot m4, is a macro processor.

=head2 Installing Parrot m4

Get the Parrot distribution. Build parrot.
  cd languages/m4
  make

=head1 Running the test suite

  make test

=head1 Running your own code

  ../../parrot m4.pbc <options> <file.m4>

=head2 Command line arguments

  ../../parrot m4.pbc --help

=head2 A simple example

=head1 SEE ALSO

=head1 AUTHOR

Bernhard Schmalhofer - C<Bernhard.Schmalhofer@gmx.de>

=cut


=begin pod

    class Version { }

Version objects identify version of software components (and potentially other
entities). Perl 6 uses them internally for versioning modules.

A version consists of several parts, which are visually represented by joining
them with a dot. A version part is usually an integer, a string like I<alpha>,
or a L<Whatever>-star C<*>. The latter is used to indicate that any version
part is acceptable in another version that is compared to the current one.

    say v1.0.1 ~~ v.1.*;    # True

Version literals can only contain numeric and L<Whatever> parts. They start
with a lowe-case C<v>, and are followed by at least one part. Multiple parts
are separate with a dot C<.>. A trailing C<+> indicates that higher versions
are OK in comparisons:

    say v1.2 ~~ v1.0;       # False
    say v1.2 ~~ v1.0+;      # True

In comparisons, early parts take precedence over later parts.

    say v1.2 cmp v2.1;      # Increase

=head1 Methods

=head2 parts

    method parts(Version:D:) returns List:D

Returns the list of parts that make up this Version object

=head2 plus

    method plus(Version:D:) returns Bool:D

Returns C<True> if comparisons against this version allow larger versions too.

=end pod

Add draft of method 'new'.

=begin pod

    class Version { }

Version objects identify version of software components (and potentially other
entities). Perl 6 uses them internally for versioning modules.

A version consists of several parts, which are visually represented by joining
them with a dot. A version part is usually an integer, a string like I<alpha>,
or a L<Whatever>-star C<*>. The latter is used to indicate that any version
part is acceptable in another version that is compared to the current one.

    say v1.0.1 ~~ v.1.*;    # True

Version literals can only contain numeric and L<Whatever> parts. They start
with a lowe-case C<v>, and are followed by at least one part. Multiple parts
are separate with a dot C<.>. A trailing C<+> indicates that higher versions
are OK in comparisons:

    say v1.2 ~~ v1.0;       # False
    say v1.2 ~~ v1.0+;      # True

In comparisons, early parts take precedence over later parts.

    say v1.2 cmp v2.1;      # Increase

=head1 Methods

=head2 new

    method new(Str:d $s)

Creates a Version from a string C<$s>.  The string is combed
for the numeric, alphabetic, and wildcard components of the version object.
Any characters other than alphanumerics and asterisks are assumed
to be equivalent to a dot.  A dot is also assumed between any adjacent
numeric and alphabetic characters.

=head2 parts

    method parts(Version:D:) returns List:D

Returns the list of parts that make up this Version object

=head2 plus

    method plus(Version:D:) returns Bool:D

Returns C<True> if comparisons against this version allow larger versions too.

=end pod


=pod

=head1 NAME

    git-comment-web - Edit comments in in a friendly web interface

=head1 SYNOPSIS

    git comment-web [<revision range>] [--port <port>]
    git comment-log --help
    git comment-log -v

=head1 DESCRIPTION

git-comment-web opens a friendly web interface for editing comments on a diff

=head1 OPTIONS

=over 4

=item --help

Print a usage message

=item I<-v>, --version

Print the current version number

=item <revision range>

Edit comments from commits in the specified revision range. When
not specified, it defaults to HEAD.

=item -I<-p> <port>, -port <port>

Bind the web server to the provided port

=back

=head1 CONFIGURATION

=over 4

=item I<comment.web-port>

Default port to which to bind the web server

=back

=head1 AUTHOR

git-comment-web was written and is maintained by Delisa Mason
<delisam@acm.org>

=head1 SEE ALSO

I<git-comment>(1)

=head1 COPYRIGHT

Copyright (c) 2015 Delisa Mason <delisam@acm.org>
All rights reserved.

=cut

Fix incorrect web binary usage

=pod

=head1 NAME

    git-comment-web - Edit comments in in a friendly web interface

=head1 SYNOPSIS

    git comment-web [<revision range>] [--port <port>]
    git comment-log --help
    git comment-log --version

=head1 DESCRIPTION

git-comment-web opens a friendly web interface for editing comments on a diff

=head1 OPTIONS

=over 4

=item --help

Print a usage message

=item I<-v>, --version

Print the current version number

=item <revision range>

Edit comments from commits in the specified revision range. When
not specified, it defaults to HEAD.

=item -I<-p> <port>, -port <port>

Bind the web server to the provided port

=back

=head1 CONFIGURATION

=over 4

=item I<comment.web-port>

Default port to which to bind the web server

=back

=head1 AUTHOR

git-comment-web was written and is maintained by Delisa Mason
<delisam@acm.org>

=head1 SEE ALSO

I<git-comment>(1)

=head1 COPYRIGHT

Copyright (c) 2015 Delisa Mason <delisam@acm.org>
All rights reserved.

=cut


=head1 Exceptions

This is a basic overview of how to deal with exceptions from PIR.
There are two main topics: throwing exceptions and catching exceptions.  We'll start with the first.

=head2 Throwing exceptions

If you're going to be using exceptions, you probably want to start by including two pasm files that define constants for exception type and severity.

    .include 'include/except_types.pasm'
    .include 'include/except_severity.pasm'

You create exceptions just like you create any other object, with C<new>.

    .local pmc ex
    ex = new 'Exception'

You usually want to at least set a descriptive message about what went wrong.

    ex = "Everything is horrible, dood."

You also usually want to set a severity and sometimes a type.  You can find these in L<runtime/parrot/include/except_severity.pasm>.

    ex['severity'] = .EXCEPT_DOOMED
    ex['type'] = .CONTROL_ERROR

You actually throw the exception by using the C<throw> op.

    throw ex

Put all together, it looks like this:

=head3 Throw Example

    .include 'include/except_types.pasm'
    .include 'include/except_severity.pasm'
    .local pmc ex
    ex = new 'Exception'
    ex = "Everything is horrible, dood."
    ex['severity'] = .EXCEPT_DOOMED
    ex['type'] = .CONTROL_ERROR
    throw ex

=head2 Catching exceptions

...

Fix line-length for coding standards tests.


=head1 Combust README

See http://svn.perl.org/perl.org/docs/live/combust/ or the Combust
website at http://combust.develooper.com/

=head2 Copyright

Combust is Copyright 2003-2004 Ask Bjrn Hansen.  See the LICENSE file.

Update Copyright year to 2009

=head1 Combust README

See http://svn.perl.org/perl.org/docs/live/combust/ or the Combust
website at http://combust.develooper.com/

=head2 Copyright

Combust is Copyright 2003-2009 Ask Bjrn Hansen.  See the LICENSE file.


## $Id: README.pod 20863 2007-08-26 18:47:04Z coke $

=head1 Things that NQP needs

This list is based on discussions with pmichaud and unimplemented
items in the grammar, C<src/Grammar.pg>.

=head2 Code

=over 4

=item * return

Return needs to work on an exception model, and will likely require
PAST/POST changes to support it.

=item * $( ... )

Scalar context.  This needs to be translated into a C<get_scalar>
method call on its argument.

=item * @( ... )

List/array context.  This needs to be translated into a C<get_array>
method call on its argument.

=item * Namespace support

=item * Named argument (not param) support

This will be added to PAST::Var by allowing parameter nodes to
have a 'named' attribute.

=back

=head2 Tests

=over 4

=item * Method ops

This may be very hard since we don't have any methods!

=item * Hash key access C<$E<lt>someKeyE<gt>>

=item * List member access C<$[index]>

=item * Match variable access C<$/>

=item * Logical operators C<&&> and C<||>

=back

Set SVN properties for new file.

## $Id$

=head1 Things that NQP needs

This list is based on discussions with pmichaud and unimplemented
items in the grammar, C<src/Grammar.pg>.

=head2 Code

=over 4

=item * return

Return needs to work on an exception model, and will likely require
PAST/POST changes to support it.

=item * $( ... )

Scalar context.  This needs to be translated into a C<get_scalar>
method call on its argument.

=item * @( ... )

List/array context.  This needs to be translated into a C<get_array>
method call on its argument.

=item * Namespace support

=item * Named argument (not param) support

This will be added to PAST::Var by allowing parameter nodes to
have a 'named' attribute.

=back

=head2 Tests

=over 4

=item * Method ops

This may be very hard since we don't have any methods!

=item * Hash key access C<$E<lt>someKeyE<gt>>

=item * List member access C<$[index]>

=item * Match variable access C<$/>

=item * Logical operators C<&&> and C<||>

=back


=head1 NAME

perl6 - Rakudo Perl 6 Compiler

=head1 SYNOPSIS

 perl6 [switches] [--] [programfile] [arguments]

=head1 DESCRIPTION

Compiles C<[programfile]> or the program given by the C<-e> option, and
by default also executes the compiled code.

  -c                   check syntax only (runs BEGIN and CHECK blocks)
  -e program           one line of program
  -h, --help           display this help text
  --target=[stage]     specify compilation stage to emit
  -t, --trace=[flags]  enable trace flags
  --encoding=[mode]    specify string encoding mode
  -o, --output=[name]  specify name of output file
  -v, --version        display version information

Note that only boolean single-letter options may be bundled

=head1 PARROT OPTIONS

To specify options to the underlying parrot VM, you must explicitly run
parrot; you cannot specify these options by using the C<perl6> executable.

 parrot [parrot switches] perl6.pbc [switches] [--] [programfile] [arguments]

See C<parrot --help> for a list of valid parrot options.

=head1 AUTHORS

Written by the Rakudo contributors, see the CREDITS file.

This manual page was written by Reini Urban, Moritz Lenz and the Rakudo
contributors.

=cut

Document valid --target= command line options

=head1 NAME

perl6 - Rakudo Perl 6 Compiler

=head1 SYNOPSIS

 perl6 [switches] [--] [programfile] [arguments]

=head1 DESCRIPTION

Compiles C<[programfile]> or the program given by the C<-e> option, and
by default also executes the compiled code.

  -c                   check syntax only (runs BEGIN and CHECK blocks)
  -e program           one line of program
  -h, --help           display this help text
  --target=[stage]     specify compilation stage to emit
  -t, --trace=[flags]  enable trace flags
  --encoding=[mode]    specify string encoding mode
  -o, --output=[name]  specify name of output file
  -v, --version        display version information

Note that only boolean single-letter options may be bundled

Supported stages for --target are:

 parse past post pir evalpmc

where

 parse = a representation of the parse tree
 past  = an intermediate format representing the parrot abstract syntax tree
 post  = an intermediate format representing the parrot opcode syntax tree
 pir   = the parrot intermediate representation

=head1 PARROT OPTIONS

To specify options to the underlying parrot VM, you must explicitly run
parrot; you cannot specify these options by using the C<perl6> executable.

 parrot [parrot switches] perl6.pbc [switches] [--] [programfile] [arguments]

See C<parrot --help> for a list of valid parrot options.

=head1 AUTHORS

Written by the Rakudo contributors, see the CREDITS file.

This manual page was written by Reini Urban, Moritz Lenz and the Rakudo
contributors.

=cut


# Copyright (C) 2007, The Perl Foundation.
# $Id: metacommitter_guide.pod 17497 2007-03-15 18:50:37Z paultcochrane $

=head1 Cage Cleaner Guide

From F<docs/roles_responsibilities.pod>:

 Fixes failing tests, makes sure coding standards are implemented, reviews
 documentation and examples. A class of tickets in the tracking system (RT)
 has been created for use by this group. This is an entry level position, and
 viewed as a good way to get familiar with parrot internals.

=head1 AUTHOR

Paul Cochrane a.k.a. ptc

=head1 SEE ALSO

F<docs/roles_responsibilities.pod>, F<RESPONSIBLE_PARTIES>

=cut

Set svn:keywords and svn:eol-style appropriately

# Copyright (C) 2007, The Perl Foundation.
# $Id$

=head1 Cage Cleaner Guide

From F<docs/roles_responsibilities.pod>:

 Fixes failing tests, makes sure coding standards are implemented, reviews
 documentation and examples. A class of tickets in the tracking system (RT)
 has been created for use by this group. This is an entry level position, and
 viewed as a good way to get familiar with parrot internals.

=head1 AUTHOR

Paul Cochrane a.k.a. ptc

=head1 SEE ALSO

F<docs/roles_responsibilities.pod>, F<RESPONSIBLE_PARTIES>

=cut


=head1 NAME

B<trash> -- move files/folders to the trash

=head1 SYNOPSIS

=over 10

=item B<trash>

[B<-vles>] I<file> I<...>

=back

=head1 DESCRIPTION

B<trash> moves the specified files and/or folders to the system trash.

The options are as follows:

=over 12

=item B<-a>

Use system API for trashing files instead of asking Finder to do it. (Faster, but the 'put back' feature in the Finder trash will not work if files are trashed using this method.) Finder is still used for trashing files you have no access rights for.

=item B<-v>

Be verbose when moving items to the trash, showing them as they are moved.

=item B<-l>

List items currently in the trash. If this argument is used, no files need to be specified.

=item B<-e>

Empty the trash. B<trash> asks for confirmation before executing this action. If this argument is used, no files need to be specified.

=item B<-s>

Securely empty the trash. B<trash> asks for confirmation before executing this action. If this argument is used, no files need to be specified.

=back

=head1 SEE ALSO

rm(1)

=head1 AUTHORS

This man page has been written by Ali Rantakari (http://hasseg.org)

Add `a` flag to the man page synopsis.

=head1 NAME

B<trash> -- move files/folders to the trash

=head1 SYNOPSIS

=over 10

=item B<trash>

[B<-avles>] I<file> I<...>

=back

=head1 DESCRIPTION

B<trash> moves the specified files and/or folders to the system trash.

The options are as follows:

=over 12

=item B<-a>

Use system API for trashing files instead of asking Finder to do it. (Faster, but the 'put back' feature in the Finder trash will not work if files are trashed using this method.) Finder is still used for trashing files you have no access rights for.

=item B<-v>

Be verbose when moving items to the trash, showing them as they are moved.

=item B<-l>

List items currently in the trash. If this argument is used, no files need to be specified.

=item B<-e>

Empty the trash. B<trash> asks for confirmation before executing this action. If this argument is used, no files need to be specified.

=item B<-s>

Securely empty the trash. B<trash> asks for confirmation before executing this action. If this argument is used, no files need to be specified.

=back

=head1 SEE ALSO

rm(1)

=head1 AUTHORS

This man page has been written by Ali Rantakari (http://hasseg.org)


=begin pod

=TITLE class Failure

=SUBTITLE Delayed exception

    class Failure { }

A C<Failure> is a I<soft> or I<unthrown> exception, usually generated by
calling C<&fail>. It acts as a wrapper around an L<Exception> object.

Sink (void) context causes a Failure to throw, i.e. turn into a normal
exception.

Checking a Failure for truth (with the C<Bool> method) or definedness (with
the C<defined> method) marks the failure as handled, and causes it not to
throw in sink context anymore.

You can call the C<handled> method to check if a failure has been handled.

Calling methods on unhandled failures propagates the failure. The
specification says the result is another C<Failure>, in Rakudo it causes the
failure to throw.

=head1 Methods

=head2 method handled

    method handled(Failure:D:) returns Bool:D

Returns C<True> for handled failures, C<False> otherwise.

=head2 method exception

    method handled(Failure:D:) returns Exception

Returns the L<Exception> object that the failure wraps.

=head2 method Bool

    multi method Bool(Failure:D:) returns Bool:D

Returns C<False>, and marks the failure as handled.

=head2 method defined

    multi method defined(Failure:D:) returns Bool:D

Returns C<False> (failures are officially undefined), and marks
the failure as handled.

=end pod

Use correct method name within its section

=begin pod

=TITLE class Failure

=SUBTITLE Delayed exception

    class Failure { }

A C<Failure> is a I<soft> or I<unthrown> exception, usually generated by
calling C<&fail>. It acts as a wrapper around an L<Exception> object.

Sink (void) context causes a Failure to throw, i.e. turn into a normal
exception.

Checking a Failure for truth (with the C<Bool> method) or definedness (with
the C<defined> method) marks the failure as handled, and causes it not to
throw in sink context anymore.

You can call the C<handled> method to check if a failure has been handled.

Calling methods on unhandled failures propagates the failure. The
specification says the result is another C<Failure>, in Rakudo it causes the
failure to throw.

=head1 Methods

=head2 method handled

    method handled(Failure:D:) returns Bool:D

Returns C<True> for handled failures, C<False> otherwise.

=head2 method exception

    method exception(Failure:D:) returns Exception

Returns the L<Exception> object that the failure wraps.

=head2 method Bool

    multi method Bool(Failure:D:) returns Bool:D

Returns C<False>, and marks the failure as handled.

=head2 method defined

    multi method defined(Failure:D:) returns Bool:D

Returns C<False> (failures are officially undefined), and marks
the failure as handled.

=end pod


=head1 NAME

perl6 - Rakudo Perl 6 Compiler

=head1 SYNOPSIS

perl6 [switches] [--] [programfile] [arguments]

=head1 DESCRIPTION

Compiles C<[programfile]> or the program given by the C<-e> option, and
by default also executes the compiled code.

  -c                   check syntax only (runs BEGIN and CHECK blocks)
  -e program           one line of program
  -h, --help           display this help text
  --target=[stage]     specify compilation stage to emit
  -t, --trace=[flags]  enable trace flags
  --encoding=[mode]    specify string encoding mode
  -o, --output=[name]  specify name of output file
  -v, --version        display version information

Note that only boolean single-letter options may be bundled

=head1 AUTHORS

Written by the Rakudo contributors, see the CREDITS file.

This manual page was written by Reini Urban, Moritz Lenz and the Rakudo
contributors.

=cut

Add docs on specifying parrot options.

=head1 NAME

perl6 - Rakudo Perl 6 Compiler

=head1 SYNOPSIS

 perl6 [switches] [--] [programfile] [arguments]

=head1 DESCRIPTION

Compiles C<[programfile]> or the program given by the C<-e> option, and
by default also executes the compiled code.

  -c                   check syntax only (runs BEGIN and CHECK blocks)
  -e program           one line of program
  -h, --help           display this help text
  --target=[stage]     specify compilation stage to emit
  -t, --trace=[flags]  enable trace flags
  --encoding=[mode]    specify string encoding mode
  -o, --output=[name]  specify name of output file
  -v, --version        display version information

Note that only boolean single-letter options may be bundled

=head1 PARROT OPTIONS

To specify options to the underlying parrot VM, you must explicitly run
parrot; you cannot specify these options by using the C<perl6> executable.

 parrot [parrot switches] perl6.pbc [switches] [--] [programfile] [arguments]

See C<parrot --help> for a list of valid parrot options.

=head1 AUTHORS

Written by the Rakudo contributors, see the CREDITS file.

This manual page was written by Reini Urban, Moritz Lenz and the Rakudo
contributors.

=cut


=head1 CHANGELOG FOR SRS::EPP::Proxy

=head2 VERSION 0.20, 25 JUNE 2010

=over

=item *

Overhaul mappings.t test file

=item *

Adjust the API regarding initial processing of EPP requests

=item *

Adjust the API regarding how we return EPP responses

=item *

Add Mappings for:

=over

=item *

Check Contact

=item *

Check Domain

=item *

Delete Contact

=item *

Delete Domain

=item *

Info Domain (work in progress)

=item *

Info Contact

=item *

Renew Domain

=back

=back

=cut

Update Changelog for release 0.2

=head1 CHANGELOG FOR SRS::EPP::Proxy

=head2 VERSION 0.20, 25 JUNE 2010

=over

=item *

Overhaul mappings.t test file

=item *

Adjust the API regarding initial processing of EPP requests

=item *

Adjust the API regarding how we return EPP responses

=item *

Add Mappings for:

=over

=item *

Check Contact

=item *

Check Domain

=item *

Create Contact

=item *

Delete Contact

=item *

Delete Domain

=item *

Info Contact

=item *

Info Domain

=item *

Renew Domain

=back

=back

=cut


=head1 PIR tutorial

Each files in this directory contains valid PIR code and POD
(Perl's Plain Old Documentation) and can be read as plain text.
To view just the documentation without the sample code, use C<perldoc>:

 perldoc example.pir

If you'd like to execute the code from files, build parrot and then type:

 ../../parrot example.pir

The parrot test suite also checks the output of these examples, via this test:

 t/examples/tutorial.t

=cut

Add command that executes the tutorial tests to the README.

=head1 PIR tutorial

Each files in this directory contains valid PIR code and POD
(Perl's Plain Old Documentation) and can be read as plain text.
To view just the documentation without the sample code, use C<perldoc>:

 perldoc example.pir

If you'd like to execute the code from files, build parrot and then type:

 ../../parrot example.pir

The parrot test suite also checks the output of these examples. Exexute
the tests by typing:

 cd ../../ ; prove -v t/examples/tutorial.t ; cd examples/tutorial

=cut


=head1 Exercise 7 (suggested by Omar)

Writing a function that, when it is invoked with a variable, attaches some
magic to it which does something, like printing a message to the screen.

Example:

    my $x = 1;
    xs_magify(\$x);

At this point we exited the scope and C<$x> has gone away.
We should see now B<Hello Magic!> on I<STDERR>.

Fix the exercise number in title.

=head1 Exercise 8 (suggested by Omar)

Writing a function that, when it is invoked with a variable, attaches some
magic to it which does something, like printing a message to the screen.

Example:

    my $x = 1;
    xs_magify(\$x);

At this point we exited the scope and C<$x> has gone away.
We should see now B<Hello Magic!> on I<STDERR>.


# Copyright: 2001-2004 The Perl Foundation.  All Rights Reserved.
# $Id$

=head1 NAME

docs/compiler_faq.pod - Parrot FAQ for compiler writers

=head1 Subroutines

=head2 How do I generate a sub call in PIR?

=head2 How do I generate a method call in PIR?

=head2 How do I generate a sub call with a variable-length parameter list in PIR?

=head2 How to I retrieve the contents of a variable-length parameter list being passed to me?

=head1 Variables

=head2 How do I fetch a variable from the global namespace?

=head2 How do I fetch a variable from the current lexical pad?

=head1 Modules and Classes

=head2 How do I create a module?

=head2 How do I create a class?

=head2 How do I instantiate a class?

=head2 How do I access module/class variables?

=head1 VERSION

=over 4

=item Revision 0.2 - 10 May 2004

=back

Make the FAQ intentions clearer

# Copyright: 2001-2004 The Perl Foundation.  All Rights Reserved.
# $Id$

=head1 NAME

docs/compiler_faq.pod - Parrot FAQ for compiler writers

=head1 General Questions

=head2 Which C compilers can I use with Parrot?

Whoa, there--you're looking at the wrong FAQ.  This document is for people
writing compilers that target Parrot.

To answer your question, though, Parrot should theoretically work with any
C89-compliant C compiler, although some features require C<gcc>.  See the
F<README> files in the root directory for more information about building
Parrot.

=head1 Subroutines

=head2 How do I generate a sub call in PIR?

=head2 How do I generate a method call in PIR?

=head2 How do I generate a sub call with a variable-length parameter list in PIR?

=head2 How to I retrieve the contents of a variable-length parameter list being passed to me?

=head1 Variables

=head2 How do I fetch a variable from the global namespace?

=head2 How do I fetch a variable from the current lexical pad?

=head1 Modules and Classes

=head2 How do I create a module?

=head2 How do I create a class?

=head2 How do I instantiate a class?

=head2 How do I access module/class variables?

=head1 VERSION

=over 4

=item Revision 0.2 - 10 May 2004

=back


=head1 NAME

milldata - Mill types and values

=head1 DESCRIPTION

Mill has a dynamic type system.

=head2 Types

=head3 The Top and Bottom Types

The top type is a supertype of all types. The bottom type is a subtype of all
types. There are no types that are strict supertypes of the top type and there
are no types that are strict subtypes of the bottom type.

The bottom type is typically used as a return type for subroutines that never
return.

=head3 Protocol Types

A protocol type defines a set of subroutines which can be overloaded by a
protocol implementation. A protocol implementation overloads these subroutines
for some type, making that type a subtype of the protocol type.

=head3 Structure Types

A structure type defines a set of fields.

=head2 Destruction

When the reference count of a Mill value reaches zero, the C<destruct>
procedure in the C<mill> module is invoked if it is overloaded for the type of
the value. The value is passed as the argument to C<destruct>.

=cut

Clarify the lack of values of the bottom type

=head1 NAME

milldata - Mill types and values

=head1 DESCRIPTION

Mill has a dynamic type system.

=head2 Types

=head3 The Top and Bottom Types

The top type is a supertype of all types. The bottom type is a subtype of all
types. There are no types that are strict supertypes of the top type and there
are no types that are strict subtypes of the bottom type. There are no values
of the bottom type.

The bottom type is typically used as the return type for subroutines that never
return, and as the exception specification for subroutines that never throw.

=head3 Protocol Types

A protocol type defines a set of subroutines which can be overloaded by a
protocol implementation. A protocol implementation overloads these subroutines
for some type, making that type a subtype of the protocol type.

=head3 Structure Types

A structure type defines a set of fields.

=head2 Destruction

When the reference count of a Mill value reaches zero, the C<destruct>
procedure in the C<mill> module is invoked if it is overloaded for the type of
the value. The value is passed as the argument to C<destruct>.

=cut


# Copyright (C) 2011, Parrot Foundation.

# This is the start to rewrite JSON. It starts with rewriting data_json only.
# data_json depends on the PGE. The rewrite use parrot-nqp.

=head1 NAME

JSON, a lightweight data-interchange format.

=head1 SYNOPSIS

The C<from_json> method return a PMC that containing the data structure
for a given valid JSON (JavaScript Object Notation) string.
For example:

    .sub 'main' :main
         .local pmc result

        load_language 'JSON'
        result = from_json( '[1,2,3]' )

        load_bytecode 'dumper.pbc'
        _dumper( result, 'JSON' )
    .end

To generate a JSON representation of a PMC, see
L<runtime/parrot/library/JSON.pir>.

For more information about the structure of the JSON representation, see
the documentation at L<http://www.json.org/>.

=cut

Update with DESCRIPTION and fixed a typo.

# Copyright (C) 2011, Parrot Foundation.

# This is the start to rewrite JSON. It starts with rewriting data_json only.
# data_json depends on the PGE. The rewrite use parrot-nqp.

=head1 NAME

JSON, a lightweight data-interchange format.

=head1 DESCRIPTION

The C<from_json> method return a PMC that contains the data structure for
a given valid JSON (JavaScript Object Notation) string. For example:

    .sub 'main' :main
         .local pmc result

        load_language 'JSON'
        result = from_json( '[1,2,3]' )

        load_bytecode 'dumper.pbc'
        _dumper( result, 'JSON' )
    .end

To generate a JSON representation of a PMC, see
L<runtime/parrot/library/JSON.pir>.

For more information about the structure of the JSON representation, see
the documentation at L<http://www.json.org/>.

=cut


Add some documentation explaining PARROT_API.

# Copyright (C) 2007, The Perl Foundation.
# $Id$

=head1 NAME

docs/dev/parrot_api.pod - Notes on the PARROT_API macro

=head1 OVERVIEW

Some compilers and platforms export all symbols either by default or through
a switch. Others have no such mechanism and either need a list of symbols to
export or need the symbols annotating in the source.

The C<PARROT_API> macro exists for the purpose of annotating symbols that
should be exported. One day, it may be used to express which functions are in
the Parrot extension API and which are not. For now it should be used to mark
anything that will be used by a shared library or by the main Parrot executable
when Parrot is built as a shared library.

=head1 USAGE NOTES

Incorrect usage of C<PARROT_API> can break the build on some platforms,
especially Win32. The rules for how to use it are as follows.

=over 4

=item If you decorate a function with C<PARROT_API> in a .c file, you must
also decorate the symbol with C<PARROT_API> in all .h files that mention it.

=item If the symbol appears in more than one header file, all of them must
have C<PARROT_API> or none of them should. Some with and some without won't
work.

=back

# vim: expandtab shiftwidth=2 tw=70:


Add some internal documentation for some thread related functions

=pod

=head1 NAME
OSSL_thread_stop_handler_fn,
ossl_init_thread_start,
ossl_init_thread_deregister
- internal thread routines
=head1 SYNOPSIS

 #include "internal/cryptlib_int.h"
 #include <openssl/core.h>

 typedef void (*OSSL_thread_stop_handler_fn)(void *arg);

 int ossl_init_thread_start(const void *index, void *arg,
                            OSSL_thread_stop_handler_fn handfn);
 int ossl_init_thread_deregister(void *index);

=head1 DESCRIPTION

Thread aware code may be informed about when a thread is stopping, typically to
perform some cleanup operation.
Thread stop events may be detected by OpenSSL either automatically (using the
capabilities of the underlying threading library) where possible or explicitly
by the application calling OPENSSL_thread_stop() or OPENSSL_thread_stop_ex().

Thread aware code registers a "stop handler" for each new thread that it uses.
Typically, when a new thread is being used, code will add a new value to some
thread local variable and then register a stop handler. When the thread is
stopping the stop handler is called (while on that thread) and the code can
clean up the value stored in the thread local variable.

A new stop handler is registerd using the function ossl_init_thread_start().
The B<index> parameter should be a unique value that can be used to identify a
set of common stop handlers and is passed in a later call to
ossl_init_thread_deregister. If no later call to ossl_init_thread_deregister is
made then NULL can be passed for this parameter. The B<arg> parameter is passed
back as an argument to the stop handler when it is later invoked. Finally the
B<handfn> is a function pointer to the stop handler itself.

In the event that previously registered stop handlers need to be deregistered
then this can be done using the function ossl_init_thread_deregister().
This will deregister all stop handlers (no matter which thread they were
registered for) which the same B<index> value.

=head1 RETURN VALUES

ossl_init_thread_start() and ossl_init_thread_deregister() return 1 for success
or 0 on error.

=head1 HISTORY

The functions described here were all added in OpenSSL 3.0.

=head1 COPYRIGHT

Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License").  You may not use
this file except in compliance with the License.  You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.

=cut


Add some initial sketchy document of how the Rakudo meta-objects will be structured.

=head1 Rakudo Meta-Object API

This document describes the meta-objects that constitute Rakudo's objects
implementation. It also describes the API to implement should you wish to
introduce your own meta-objects.

=head2 Meta-model Organization

Rakudo is built on top of the NQP platform. NQP provides an object model
core that is often known as "6model". It is inspired by the needs of Perl
6, but actually provides a very minimal base that other languages can build
their own meta-objects on top of.

While Rakudo could start from these base primitives, instead it makes use
of some of the NQP meta-objects. Out of the box 6model provides no concept
of classes or roles. NQP's meta-objects include a simple, non-parametric
implementation of roles and a simple but capable implementation of classes.
These are put to use in writing Rakudo's meta-objects.

The Rakudo meta-objects are generally factored in terms of roles. These are
composed into classes that represent the various types of Perl 6 package
(such as classes and roles).

=head2 Roles

The following roles exist and provide re-usable pieces of functionality
that can be re-used in various places in the meta-model.

=head3 MethodContainer

This role provides storage of methods, method addition and method
introspection.

=head3 MultiMethodContainer

This role provides the extra pieces needed for multi-method handling.

=head3 AttributeContainer

This role provides storage of attributes, attribute addition and attribute
introspection.

=head3 RoleContainer

This role provides storage of roles, role addition and role introspection.
The composition process is not part of the functionality provided by this
role, however.

=head3 MultiInheritance

Provides for addition of multiple parents, and introspection of them too.

=head3 C3MRO

This role provides an implementation of the C3 method resolution order.

=head3 Versionable

This role provides storage and introspection of a version and authority.

=head2 Classes

The following classes exist in the Perl 6 meta-model.

=head3 ModuleHOW

Provides an implementation of modules.

=head3 ClassHOW

Provides an implementation of classes.

=head3 ParametricRoleHOW

Provides an implementation of parametric roles, which may be instantiated.

=head3 ConcreteRoleHOW

Provides an implementation of a concrete instance of a role.

=head3 GrammarHOW

Provides an implementation of grammars. Actually, just a subclass of the
ClassHOW since grammars are really just slightly specialized classes.

=head3 SubsetHOW

Provides an implementation of subset types.

=head3 Attribute

Represents an attribute.

=head3 RoleToClassComposer

Composes a single role into a class. (If many roles are specified, it makes
a single role that does all of the roles the class wishes to, and then
composes that single role).

=head3 RoleToRoleComposer

Composes one or more roles into another role, creating a kind of role
"summation".

=head3 RoleToObjectComposer

Compoes a role into an object - essentially doing a mix-in.


=begin pod

=TITLE Input/Output

=SUBTITLE Reading and writing to files

=begin comment
TODO: base on https://github.com/perl6/specs/blob/master/S32-setting-library/IO.pod?
TODO: document http://doc.perl6.org/sub/open
TODO: http://doc.perl6.org/type/IO::Handle has close but no open
TODO: http://doc.perl6.org/routine/open does not describe any valid options
=end comment

=end pod


Add a basic readme file, needed for generating a manpage for the executable.

# Copyright (C) 2010, Parrot Foundation.
# $Id: $

=head1 NAME

opsc - An opcode compiler for Parrot

=head1 DESCRIPTION

Ops-to-C is a compiler to generate opcode definition files in C from
Parrot's opcode definition language.

=head1 SYNOPSIS

 opsc [-options] <file>

=head1 OPTIONS

=over 4

=item -c, --core

Generate C code for core ops (for use only in building the Parrot VM)

=item -d, --dynamic

Generate C code for dynamic ops in a single file.

=item -q, --quiet

Only report error messages, other messages are silent.

=item -h, --help

Print usage information.

=item -n, --no-lines

Do not print #line directives in generated C code.

=item -g, --debug

Perform all processing but do not write to any files.

=back

=cut


=begin pod

=TITLE Temporal

=SUBTITLE Time-related functions

=head1 Functions

=head2 sub sleep

    sub sleep($seconds = Inf --> Nil)

Attempt to sleep for the given number of C<$seconds>.  Returns C<Nil> on
completion.  Accepts C<Int>, C<Num>, C<Rat>, or C<Duration> types as an
argument since all of these also do C<Real>.

    sleep 5                # Int
    sleep 5.2              # Num
    sleep (5/2)            # Rat
    sleep (now - now + 5)  # Duration

It is thus possible to sleep for a non-integer amount of time.  For
instance, the following code shows that C<sleep (5.2)> sleeps for 2.5
seconds and C<sleep 5.2> sleeps for 5.2 seconds:

    my $before = now
    sleep (5/2)
    my $after = now
    say $after-$before  #=> 2.502411561

    my $before = now
    sleep 5.2
    my $after = now
    say $after-$before  #=> 5.20156987

=head2 sub sleep-timer

    sub sleep-timer(Real $seconds = Inf --> Duration)

This function is just like C<sleep>, but returns the amount of time
remaining to sleep as a C<Duration> (which will be 0 if the call was not
interrupted).

    say sleep-timer 3.14  #=> 0

=head2 sub sleep-till

    sub sleep-till(Instant $till --> Bool)

Works just like C<sleep> but checks the current time and goes back to sleep
if accidentally woken up early, to guarantee waiting until the specified
time.  Returns C<True> if the function actually waited, or if the specified
time happens to be the present moment.  Returns C<False> if you asked to
sleep until a time in the past.

To sleep until 10 seconds into the future, one could write something like this:

    say sleep-till now+10     #=> True

Trying to sleep until a time in the past doesn't work:

    my $instant = now - 5;
    say sleep-till $instant   # => False

However if we put the instant sufficiently far in the future, the sleep
should run:

    my $instant = now + 30
    # assuming the two commands are run within 30 seconds of one another...
    say sleep-till $instant   # => True

To specify an exact instant in the future, first create a C<DateTime> at the
appropriate point in time, and cast to an C<Instant>.

    my $instant = DateTime.new(
        year => 2020,
        month => 9,
        day => 1,
        hour => 22,
        minute => 5);
    say sleep-till $instant.Instant  # => True (eventually...)

=end pod

# vim: expandtab shiftwidth=4 ft=perl6


Add documentation for SSL_*_ex_data() functions

=pod

=head1 NAME

SSL_CTX_get_ex_data, SSL_CTX_set_ex_data,
SSL_get_ex_data, SSL_set_ex_data,
SSL_SESSION_get_ex_data, SSL_SESSION_set_ex_data
- Store and retrieve extra data from the SSL_CTX, SSL or SSL_SESSION

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 void *SSL_CTX_get_ex_data(const SSL_CTX *s, int idx);

 int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg);

 void *SSL_get_ex_data(const SSL *s, int idx);

 int SSL_set_ex_data(SSL *s, int idx, void *arg);

 int SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, void *arg);

 void *SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx);

=head1 DESCRIPTION

SSL*_set_ex_data() functions can be used to store arbitrary user data into the
B<SSL_CTX>, B<SSL> or B<SSL_SESSION>. The user must supply a unique index
which they can subsequently use to retrieve the data using SSL*_get_ex_data().

For more detailed information see L<CRYPTO_get_ex_data(3)> and
L<CRYPTO_set_ex_data(3)> which implement these functions and
L<CRYPTO_get_ex_new_index(3)> for generating a unique index.

=head1 RETURN VALUES

The SSL*_set_ex_data() functions return 1 if the item is successfully stored
and 0 if it is not.
The SSL*_get_ex_data() functions return the ex_data pointer if successful,
otherwise NULL.

=head1 SEE ALSO

L<CRYPTO_get_ex_data(3)>, L<CRYPTO_set_ex_data(3)>,
L<CRYPTO_get_ex_new_index(3)>

=head1 COPYRIGHT

Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the OpenSSL license (the "License").  You may not use
this file except in compliance with the License.  You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.

=cut


Add a hacking doc: adding support for a new build tool

=begin

=head1 Adding a New Build Tool

There are a great many build tools in the wild, from F<make> to F<Build>,
F<rake> to F<distutils>.  Each of these has its own conventions, command
structure, and so on.  This document describes the steps necessary to add
support for a new build tool to Plumage.

=head2 System Program Location

If the tool requires a system program not yet known to Plumage, you will need
to add a line to the C<find_binaries()> sub at the end of the C<INIT> section
of F<src/plumage.nqp> to cache the location of the new binary.  There are three
stanzas to choose from, each finding programs using a different technique:

=over 4

=item *

Programs installed with parrot

=item *

Programs used to build parrot

=item *

Miscellaneous programs in the user's search path

=back

=head2 Build Tool Type Name

Each build tool is identified in the metadata by a unique type name matching
C</^[a-z][a-z0-9_]*[a-z0-9]$/>.  For unique or cross-language tools, the type
name is generally just the lowercase name of the build tool; C<make> and
C<rake> use this convention.  If this might be ambiguous, or the tool depends
on an unrelated program, a more specific name can be used; C<perl5_build> and
C<parrot_setup> are examples of this.

Please discuss your suggested new build type name with the Plumage development
team before committing to the new name -- we'd prefer not to have to change
it after users have already started depending on it.

=head2 Specific Action Methods

For each project action in F<src/lib/Plumage/Project.nqp> that the new build
tool supports, you will need to add specific action methods to implement that
action using the new tool.  These are named with the base action method name
and the build tool's type name separated by an underscore.  For example, to
support Parrot's F<setup.pir> tool, with the type name C<parrot_setup>, we
added new methods named C<build_parrot_setup()>, C<test_parrot_setup()>, and
so on.  Each of these must return 1 for success and 0 for failure.

=head2 Documentation

XXXX: SPECULATIVE

Add a new entry to the list of supported build tools, and describe the tool
in more detail, along with any special features or limitations of the Plumage
support in the C<DESCRIPTION> section of F<src/lib/Plumage/Project.nqp>'s POD.

=head2 Tests

C<Plumage::Project> does not have a test suite yet.

=end


=begin pod

=TITLE class X::NoDispatcher

=SUBTITLE Error due to calling a dispatch command in an ineligible scope

    class X::NoDispatcher is Exception { }

Error thrown when a redispatcher like C<nextsame> is called without being in the
dynamic scope of a call that could possible redispatch.

For example

    nextsame

in the mainline dies with

    nextsame is not in the dynamic scope of a dispatcher

=head1 Methods

=head2 method redispatcher

    method redispatcher() returns Str:D

Returns the name of the redispatcher function that did not succeed.

=end pod

Correct typo and re-massage sentence.

=begin pod

=TITLE class X::NoDispatcher

=SUBTITLE Error due to calling a dispatch command in an ineligible scope

    class X::NoDispatcher is Exception { }

When a redispatcher like C<nextsame> is called without being in the
dynamic scope of a call where a redispatch is possible, an X::NoDispatcher is
thrown.

For example

    nextsame

in the mainline dies with

    nextsame is not in the dynamic scope of a dispatcher

=head1 Methods

=head2 method redispatcher

    method redispatcher() returns Str:D

Returns the name of the redispatcher function that did not succeed.

=end pod


Add some docs on the REPL and line editors

=head1 REPL LINE EDITOR

The read-eval-print-loop (aka. the REPL) has the abilty to load a line editor
module if one is available.  This makes facilities such as line editing,
persistent history, and symbol completion.

If you don't have any line editing modules installed, you may use C<rlwrap> to
provide much of the same functionality.

=head2 AVAILABLE EDITORS

Right now, there are new line editor modules available: C<Readline> and C<Linenoise>.
They have roughly the same functionality, but C<Linenoise> provides tab completion,
and C<Readline> has an easier time with multibyte input.

=head2 ENVIRONMENT VARIABLES

The line editor used by the REPL can be configured via various environment
variables, listed here.

=over 4

=item RAKUDO_DISABLE_MULTILINE

This disables multi-line input for the REPL if truthy.

=item RAKUDO_HIST

This specifies the location of the history file used by the line editor; the
default is C<~/.perl6/rakudo-history>.

=item RAKUDO_LINE_EDITOR

This specifies the preferred line editor to use; valid values are C<Readline>,
C<Linenoise>, and C<none>.  A value of C<none> is useful if you want to avoid
the recommendation message upon REPL startup.

=back

=cut


=pod

=head1 NAME

UI_UTIL_read_pw_string, UI_UTIL_read_pw,
*UI_UTIL_wrap_read_pem_callback - user interface utilities

=head1 SYNOPSIS

 #include <openssl/ui.h>

 int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt,
                            int verify);
 int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt,
                     int verify);
 UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int
 rwflag);

=head1 DESCRIPTION

UI_UTIL_read_pw_string() asks for a passphrase, using B<prompt> as a
prompt, and stores it in B<buf>.
The maximum allowed size is given with B<length>, including the
terminating NUL byte.
If B<verify> is non-zero, the password will be verified as well.

UI_UTIL_read_pw() does the same as UI_UTIL_read_pw_string(), the
difference is that you can give it an external buffer B<buff> for the
verification passphrase.

UI_UTIL_wrap_read_pem_callback() can be used to create a temporary
B<UI_METHOD> that wraps a given PEM password callback B<cb>.
B<rwflag> is used to specify if this method will be used for
passphrase entry without (0) or with (1) verification.
When not used any more, the returned method should be freed with
UI_destroy_method().

=head1 COPYRIGHT

Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the OpenSSL license (the "License").  You may not use
this file except in compliance with the License.  You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.

=cut


Add documentation about types and values

=head1 NAME

milldata - Mill types and values

=head1 DESCRIPTION

Mill has a dynamic type system.

=head2 Types

=head3 The Top and Bottom Types

The top type is a supertype of all types. The bottom type is a subtype of all
types. There are no types that are strict supertypes of the top type and there
are no types that are strict subtypes of the bottom type.

The bottom type is typically used as a return type for subroutines that never
return.

=head3 Protocol Types

A protocol type defines a set of subroutines which can be overloaded by a
protocol implementation. A protocol implementation overloads these subroutines
for some type, making that type a subtype of the protocol type.

=head3 Structure Types

A structure type defines a set of fields.

=head2 Destruction

When the reference count of a Mill value reaches zero, the C<destruct>
procedure in the C<mill> module is invoked if it is overloaded for the type of
the value. The value is passed as the argument to C<destruct>.

=cut


=pod

=head1 NAME

SSL_CTX_set_tlsext_servername_callback, SSL_CTX_set_tlsext_servername_arg,
SSL_get_servername_type, SSL_get_servername - handle server name indication
(SNI)

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 long SSL_CTX_set_tlsext_servername_callback(SSL_CTX *ctx,
                                   int (*cb)(SSL *, int *, void *));
 long SSL_CTX_set_tlsext_servername_arg(SSL_CTX *ctx, void *arg);

 const char *SSL_get_servername(const SSL *s, const int type);
 int SSL_get_servername_type(const SSL *s);

=head1 DESCRIPTION

SSL_CTX_set_tlsext_servername_callback() sets the application callback B<cb>
used by a server to perform any actions or configuration required based on
the servername extension received in the incoming connection. When B<cb>
is NULL, SNI is not used. The B<arg> value is a pointer which is passed to
the application callback.

SSL_CTX_set_tlsext_servername_arg() sets a context-specific argument to be
passed into the callback for this B<SSL_CTX>.

SSL_get_servername() returns a servername extension value of the specified
type if provided in the Client Hello or NULL.

SSL_get_servername_type() returns the servername type or -1 if no servername
is present. Currently the only supported type (defined in RFC3546) is
B<TLSEXT_NAMETYPE_host_name>.

=head1 NOTES

The ALPN and SNI callbacks are both executed during Client Hello processing.
The servername callback is executed first, followed by the ALPN callback.

=head1 RETURN VALUES

SSL_CTX_set_tlsext_servername_callback() and
SSL_CTX_set_tlsext_servername_arg() both always return 1 indicating success.

=head1 SEE ALSO

L<ssl(7)>, L<SSL_CTX_set_alpn_select_cb(3)>,
L<SSL_get0_alpn_selected(3)>

=head1 COPYRIGHT

Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the OpenSSL license (the "License").  You may not use
this file except in compliance with the License.  You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.

=cut


=head1 NAME

docs/project/git_terminology.pod - Git Terminology

=head1 DESCRIPTION

This document describes terms that are used in docs/project/git_workflow.pod
and contains generally useful things to know about Git.

=cut

__END__
Local Variables:
  fill-column:78
End:

Add the beginning of an intro to the git terminology doc

=head1 NAME

docs/project/git_terminology.pod - Git Terminology

=head1 DESCRIPTION

This document describes terms that are used in docs/project/git_workflow.pod
and contains generally useful things to know about Git.

=head2 INTRODUCTION

Before learning any terminology, there are a few very basic things that
should be understood about Git, which will provide a foundation for
understanding anything else.

A Git repository is a Directed Acyclic Graph (DAG), where each node in the
graph is a commit, with zero or more parents. The first commit of a
repository has zero parents, others have at least one parent. If a commit has
more than one parent, that means it was the result of a merge.

=cut

__END__
Local Variables:
  fill-column:78
End:


Add documentation for the ability to control the number of tickets

=pod

=head1 NAME

SSL_set_num_tickets,
SSL_get_num_tickets,
SSL_CTX_set_num_tickets,
SSL_CTX_get_num_tickets
- control the number of TLSv1.3 session tickets that are issued

=head1 SYNOPSIS

 #include <openssl/ssl.h>

 int SSL_set_num_tickets(SSL *s, size_t num_tickets);
 size_t SSL_get_num_tickets(SSL *s);
 int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
 size_t SSL_CTX_get_num_tickets(SSL_CTX *ctx);

=head1 DESCRIPTION

SSL_CTX_set_num_tickets() and SSL_set_num_tickets() can be called for a server
application and set the number of session tickets that will be sent to the
client after a full handshake. Set the desired value (which could be 0) in the
B<num_tickets> argument. Typically these functions should be called before the
start of the handshake.

The default number of tickets is 2; the default number of tickets sent following
a resumption handshake is 1 but this cannot be changed using these functions.
The number of tickets following a resumption handshake can be reduced to 0 using
custom session ticket callbacks (see L<SSL_CTX_set_session_ticket_cb(3)>).

Tickets are also issued on receipt of a post-handshake certificate from the
client following a request by the server using
L<SSL_verify_client_post_handshake(3)>. These new tickets will be associated
with the updated client identity (i.e. including their certificate and
verification status). The number of tickets issued will normally be the same as
was used for the initial handshake. If the initial handshake was a full
handshake then SSL_set_num_tickets() can be called again prior to calling
SSL_verify_client_post_handshake() to update the number of tickets that will be
sent.

SSL_CTX_get_num_tickets() and SSL_get_num_tickets() return the number of
tickets set by a previous call to SSL_CTX_set_num_tickets() or
SSL_set_num_tickets(), or 2 if no such call has been made.

=head1 RETURN VALUES

SSL_CTX_set_num_tickets() and SSL_set_num_tickets() return 1 on success or 0 on
failure.

SSL_CTX_get_num_tickets() and SSL_get_num_tickets() return the number of tickets
that have been previously set.

=head1 HISTORY

These functions were added in OpenSSL 1.1.1.

=head1 COPYRIGHT

Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the OpenSSL license (the "License").  You may not use
this file except in compliance with the License.  You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.

=cut


# Copyright (C) 2007, The Perl Foundation.
# $Id: metacommitter_guide.pod 17497 2007-03-15 18:50:37Z paultcochrane $

=head1 Cage Cleaner Guide

From F<docs/roles_responsibilities.pod>:

 Fixes failing tests, makes sure coding standards are implemented, reviews
 documentation and examples. A class of tickets in the tracking system (RT)
 has been created for use by this group. This is an entry level position, and
 viewed as a good way to get familiar with parrot internals.

=head1 AUTHOR

Paul Cochrane a.k.a. ptc

=head1 SEE ALSO

F<docs/roles_responsibilities.pod>, F<RESPONSIBLE_PARTIES>

=cut

Set svn:keywords and svn:eol-style appropriately

# Copyright (C) 2007, The Perl Foundation.
# $Id$

=head1 Cage Cleaner Guide

From F<docs/roles_responsibilities.pod>:

 Fixes failing tests, makes sure coding standards are implemented, reviews
 documentation and examples. A class of tickets in the tracking system (RT)
 has been created for use by this group. This is an entry level position, and
 viewed as a good way to get familiar with parrot internals.

=head1 AUTHOR

Paul Cochrane a.k.a. ptc

=head1 SEE ALSO

F<docs/roles_responsibilities.pod>, F<RESPONSIBLE_PARTIES>

=cut


=head1 NAME

ports/ - Packaged Parrot

=head1 DESCRIPTION

This directory contains the source and tools for creating Parrot packages for
various operating systems and platforms.

=over 4

=item cygwin

=item debian

=item fedora

=item macports

=item mandriva

=item suse

=item ubuntu

=back

=head1 COPYRIGHT

Copyright (C) 2011, Parrot Foundation.

=cut


=head1 Combust README

See docs/live/combust/index.pod or the Combust website at
http://combust.develooper.com/

=head2 Copyright

Combust is Copyright 2003-2004 Ask Bjrn Hansen.  See the LICENSE file.

Update URL to combust documentation

=head1 Combust README

See http://svn.perl.org/perl.org/docs/live/combust/ or the Combust
website at http://combust.develooper.com/

=head2 Copyright

Combust is Copyright 2003-2004 Ask Bjrn Hansen.  See the LICENSE file.


(* After a Posix fork there is only one thread in the child.
   There could be a GC before any exec so this is a check that it works. *)
case #lookupStruct (PolyML.globalNameSpace) "Posix" of
    SOME _ => ()
|   NONE => raise NotApplicable;

let
    open Posix.Process
in
case fork() of
    NONE =>
        (
            PolyML.fullGC();
            OS.Process.terminate OS.Process.success (* terminate not exit *)
        )
    |   SOME pid => waitpid(W_CHILD pid, [])
end;

Remove the test of GC in a forked child. This seems to fail badly on some platforms and is probably not worthwhile.

(* After a Posix fork there is only one thread in the child.
   There could be a GC before any exec so this is a check that it works. *)
(* This is really a problem.  Remove the GC and only test the basic
   fork functionality. *)
case #lookupStruct (PolyML.globalNameSpace) "Posix" of
    SOME _ => ()
|   NONE => raise NotApplicable;

let
    open Posix.Process
in
case fork() of
    NONE =>
        (
            (*PolyML.fullGC();*)
            OS.Process.terminate OS.Process.success (* terminate not exit *)
        )
    |   SOME pid => waitpid(W_CHILD pid, [])
end;


(* Overflow at compile time in unreachable code. *)

Array.update (Array.fromList [], ~1, 0) handle Subscript => ();
let val array = Array2.array (1, 1, 0) in Array2.sub (array, ~1, 0) handle Subscript => 0 end;
fun f r = Vector.sub(r, ~1);

Add a related check for offsets that could exceed a signed 32-bit value.

(* Overflow at compile time in unreachable code. *)

Array.update (Array.fromList [], ~1, 0) handle Subscript => ();
let val array = Array2.array (1, 1, 0) in Array2.sub (array, ~1, 0) handle Subscript => 0 end;
fun f r = Vector.sub(r, ~1);

(* This could also raise an exception in the compiler. *)
fun f r = Vector.sub(r, FixedInt.toInt(valOf FixedInt.maxInt) div 8);


structure SetS =
RedBlackSetFn(struct type ord_key = string val compare = String.compare end)

structure MapS =
RedBlackMapFn(struct type ord_key = string val compare = String.compare end)

structure SetI =
RedBlackSetFn(struct type ord_key = int val compare = Int.compare end)

structure MapI =
RedBlackMapFn(struct type ord_key = int val compare = Int.compare end)

structure Global = struct

  fun assert a = if a() then () else raise Fail "Invariant"

end

Add infinite-precision sets and maps

structure SetS =
RedBlackSetFn(struct type ord_key = string val compare = String.compare end)

structure MapS =
RedBlackMapFn(struct type ord_key = string val compare = String.compare end)

structure SetI =
RedBlackSetFn(struct type ord_key = int val compare = Int.compare end)

structure MapI =
RedBlackMapFn(struct type ord_key = int val compare = Int.compare end)

structure SetII =
RedBlackSetFn(struct type ord_key = IntInf.int val compare = IntInf.compare end)

structure MapII =
RedBlackMapFn(struct type ord_key = IntInf.int val compare = IntInf.compare end)

structure Global = struct

  fun assert a = if a() then () else raise Fail "Invariant"

end


(* This is a check that return addresses are correctly identified as
   references to code cells. *)

fun f () = (OS.Process.sleep(Time.fromSeconds 3); print "Done\n");
val _ = Thread.Thread.fork(f, []);
fun f () = print "A new function";

PolyML.fullGC();
fun f () = print "A new function";
PolyML.fullGC();

Remove print from test. It spoils the output.

(* This is a check that return addresses are correctly identified as
   references to code cells. *)

fun f () = (OS.Process.sleep(Time.fromSeconds 3); ());
val _ = Thread.Thread.fork(f, []);
fun f () = print "A new function";

PolyML.fullGC();
fun f () = print "A new function";
PolyML.fullGC();


(* This is the sum type containing all the operators in JonPRL's
 * programming language. *)
structure OperatorData =
struct
  type opid = string

  datatype 'i operator =
      S of 'i ScriptOperator.t
    | LVL_OP of 'i LevelOperator.t
    | VEC_LIT of Sort.t * int
    | OP_SOME of Sort.t
    | OP_NONE of Sort.t
    | CUST of opid * ('i * Sort.t) list * Arity.t
end

Add a comment on CUST

(* This is the sum type containing all the operators in JonPRL's
 * programming language. *)
structure OperatorData =
struct
  type opid = string

  datatype 'i operator =
      S of 'i ScriptOperator.t
    | LVL_OP of 'i LevelOperator.t
    | VEC_LIT of Sort.t * int
    | OP_SOME of Sort.t
    | OP_NONE of Sort.t
    | CUST of opid * ('i * Sort.t) list * Arity.t
        (* it may make sense in the future to replace [opid] with ['i];
         * then, we could seamlessly rename operators when importing one
         * development into another. *)
end


(*
    Copyright (c) 2007-12 David C.J. Matthews

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*)

structure CompilerVersion =
struct
   val compilerVersion = "5.5.0 Release"
   val versionNumber = 550
   val versionSuffix = Int.toString versionNumber
end;

Increment compiler version number. This is needed before any changes are made to the interface between the compiler and the basis library.

(*
    Copyright (c) 2007-12 David C.J. Matthews

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*)

structure CompilerVersion =
struct
   val compilerVersion = "5.5.1 Development"
   val versionNumber = 551
   val versionSuffix = Int.toString versionNumber
end;


structure Level :> LEVEL =
struct
  type t = int

  type constraint = int
  type substitution = int -> int

  exception LevelError

  fun max (i, j) = Int.max (i, j)

  fun succ i = i + 1
  fun pred i = if i > 0 then i - 1 else raise LevelError
  val base = 0

  local
    fun ticks 0 R = R
      | ticks n R = ticks (n - 1) (#"'" :: R)
  in
    fun toString i =
      "i" ^ String.implode (ticks i [])
  end

  fun assertLt (i, j) = if i < j then () else raise LevelError
  fun assertEq (i, j) = if i = j then () else raise LevelError

  fun yank x = fn y => x + y
  fun pred x = x - 1
  fun unify (x, y) = y - x

  local
    fun go [] = 0
      | go (x :: xs) =
          if (foldl (fn (y, b) => b andalso x = y) true xs) then
            x
          else
            raise LevelError
  in
    fun resolve xs = fn x => x + go xs
  end

  fun subst f x = f x

  local
    open ParserCombinators CharParser
    infix wth >>
  in
    val parse : t charParser = char #"i" >> repeat (char #"'") wth length
  end
end

Use List.all instead of foldl

structure Level :> LEVEL =
struct
  type t = int

  type constraint = int
  type substitution = int -> int

  exception LevelError

  fun max (i, j) = Int.max (i, j)

  fun succ i = i + 1
  fun pred i = if i > 0 then i - 1 else raise LevelError
  val base = 0

  local
    fun ticks 0 R = R
      | ticks n R = ticks (n - 1) (#"'" :: R)
  in
    fun toString i =
      "i" ^ String.implode (ticks i [])
  end

  fun assertLt (i, j) = if i < j then () else raise LevelError
  fun assertEq (i, j) = if i = j then () else raise LevelError

  fun yank x = fn y => x + y
  fun pred x = x - 1
  fun unify (x, y) = y - x

  local
    fun go [] = 0
      | go (x :: xs) =
          if List.all (fn y => x = y) xs then
            x
          else
            raise LevelError
  in
    fun resolve xs = fn x => x + go xs
  end

  fun subst f x = f x

  local
    open ParserCombinators CharParser
    infix wth >>
  in
    val parse : t charParser = char #"i" >> repeat (char #"'") wth length
  end
end


structure FileIO :> FILE_IO = struct

val mostRecentModTimeRef = ref (Time.zeroTime)

fun checkFileModTime fname =
  let val mtime = OS.FileSys.modTime fname in
      if Time.compare (mtime, !mostRecentModTimeRef) = GREATER andalso
         Time.compare (mtime, Globals.getResetTime ()) = LESS
      then mostRecentModTimeRef := mtime
      else ()
  end

fun mostRecentModTime () =
  if Time.compare (!mostRecentModTimeRef, Time.zeroTime) = EQUAL
  then Globals.getResetTime ()
  else !mostRecentModTimeRef

fun txtOpenIn fname =
  let
      val inf = TextIO.openIn fname
      val () = checkFileModTime fname
  in
      inf
  end

fun binOpenIn fname =
  let
      val inf = BinIO.openIn fname
      val () = checkFileModTime fname
  in
      inf
  end

end

Use 1s precision when comparing file mtimes

structure FileIO :> FILE_IO = struct

val mostRecentModTimeRef = ref (Time.zeroTime)

fun checkFileModTime fname =
  let
      val mtime = OS.FileSys.modTime fname
      val mostRecentMod = !mostRecentModTimeRef
      val resetTime = Globals.getResetTime ()
      fun lessThan (a, b) = LargeInt.compare (Time.toSeconds a, Time.toSeconds b) = LESS
      infix lessThan
  in
      if mostRecentMod lessThan mtime andalso mtime lessThan resetTime
      then mostRecentModTimeRef := mtime
      else ()
  end

fun mostRecentModTime () =
  if Time.compare (!mostRecentModTimeRef, Time.zeroTime) = EQUAL
  then Globals.getResetTime ()
  else !mostRecentModTimeRef

fun txtOpenIn fname =
  let
      val inf = TextIO.openIn fname
      val () = checkFileModTime fname
  in
      inf
  end

fun binOpenIn fname =
  let
      val inf = BinIO.openIn fname
      val () = checkFileModTime fname
  in
      inf
  end

end


structure Response :> RESPONSE = struct
	type response = {
		title : string,
		body : Web.html,
		css : string list
	}

	fun new (title, body) : response = {title = title, body = body, css = []}

	fun addCss {title, body, css} newCss =
		{title = title, body = body, css = newCss::css}

	fun render resp = TPage.render (addCss resp "static/page.css")
end

Prepend URL base to CSS

structure Response :> RESPONSE = struct
	type response = {
		title : string,
		body : Web.html,
		css : string list
	}

	fun new (title, body) : response = {title = title, body = body, css = []}

	fun addCss {title, body, css} newCss =
		{title = title, body = body, css = newCss::css}

	val cssBase = "http://sfbprofiler.jwatzman.org:8080/"

	fun render {title, body, css} =
		TPage.render {
			title = title,
			body = body,
			css = map (fn c => cssBase ^ c) ("static/page.css"::css)
		}
end


(* Some bugs in Word32 on 64-bit and a bug in arithmetic right shift
   with a constant shift value. *)

fun check a b = if a = b then () else raise Fail "Bad";

check(Word32.toIntX 0wx0) 0;
check(Word32.toIntX 0wx1) 1;
check(Word32.toIntX 0wx7FFFFFFF) 2147483647;
check(Word32.toIntX 0wx80000000) ~2147483648;
check(Word32.toIntX 0wx80000001) ~2147483647;
check(Word32.toIntX 0wxFFFFFFFE) ~2;
check(Word32.toIntX 0wxFFFFFFFF) ~1;

check(Word32.toLargeX 0wx0) 0wx0;
check(Word32.toLargeX 0wx1) 0wx1;
check(Word32.toLargeX 0wx7FFFFFFF) 0wx7FFFFFFF;

check (let val r = ref 0w4 in Word.~>>(!r, 0w1) end) 0w2;

(* Checks that fromLargeInt returns the same result as fromInt *)

check(Word32.fromLargeInt ~1 = 0wxFFFFFFFF);
check(Word32.fromLargeInt (IntInf.pow (2, 32)) = 0wx0);

Fix the regression test. The wrong version was committed.

(* Some bugs in Word32 on 64-bit and a bug in arithmetic right shift
   with a constant shift value. *)

fun check a b = if a = b then () else raise Fail "Bad";

check(Word32.toIntX 0wx0) 0;
check(Word32.toIntX 0wx1) 1;
check(Word32.toIntX 0wx7FFFFFFF) 2147483647;
check(Word32.toIntX 0wx80000000) ~2147483648;
check(Word32.toIntX 0wx80000001) ~2147483647;
check(Word32.toIntX 0wxFFFFFFFE) ~2;
check(Word32.toIntX 0wxFFFFFFFF) ~1;

check(Word32.toLargeX 0wx0) 0wx0;
check(Word32.toLargeX 0wx1) 0wx1;
check(Word32.toLargeX 0wx7FFFFFFF) 0wx7FFFFFFF;

check (let val r = ref 0w4 in Word.~>>(!r, 0w1) end) 0w2;

(* Checks that fromLargeInt returns the same result as fromInt *)

check(Word32.fromLargeInt ~1) 0wxFFFFFFFF;
check(Word32.fromLargeInt (IntInf.pow (2, 32))) 0wx0;


(*
	Copyright (c) 2000
		Cambridge University Technical Services Limited

	This library is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License as published by the Free Software Foundation; either
	version 2.1 of the License, or (at your option) any later version.

	This library is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
	Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with this library; if not, write to the Free Software
	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*)

(* Script to rebuild the compiler. *)

PolyML.print_depth 0;

PolyML.use "mlsource/prelude/RuntimeCalls";
PolyML.use "mlsource/prelude/Address";

PolyML.make "mlsource/MLCompiler/Boot";
PolyML.make "mlsource/MLCompiler";

(* Set the debug level to 50 while compiling the basis.  This makes
   sure that String.foldr can be expanded inline which reduces the
   garbage in the hashValue function. *)
Debug.maxInlineSize := 50;

(* Compile the prelude and basis in the new compiler. *)
MLCompiler.use "mlsource/BuildBasis.sml";

(* This runs the new shell on top of the old one. *)
MLCompiler.shell();
PolyML.rootFunction();

Remove references to prelude files that are now compiled in the basis.

(*
	Copyright (c) 2000
		Cambridge University Technical Services Limited

	This library is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License as published by the Free Software Foundation; either
	version 2.1 of the License, or (at your option) any later version.

	This library is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
	Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with this library; if not, write to the Free Software
	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*)

(* Script to rebuild the compiler. *)

PolyML.print_depth 0;

PolyML.make "mlsource/MLCompiler/Boot";
PolyML.make "mlsource/MLCompiler";

(* Set the debug level to 50 while compiling the basis.  This makes
   sure that String.foldr can be expanded inline which reduces the
   garbage in the hashValue function. *)
Debug.maxInlineSize := 50;

(* Compile the prelude and basis in the new compiler. *)
MLCompiler.use "mlsource/BuildBasis.sml";

(* This runs the new shell on top of the old one. *)
MLCompiler.shell();
PolyML.rootFunction();


signature DEVELOPMENT =
sig
  type term
  type pattern
  type judgement
  type evidence

  type conv = term -> term
  type tactic

  structure Telescope : TELESCOPE
  type label = Telescope.label

  structure Object :
  sig
    type t
    val toString : label * t -> string
  end

  type t
  type object = Object.t

  val out : t -> object Telescope.telescope

  (* the empty development *)
  val empty : t

  (* extend a development with a theorem *)
  val prove : t -> label * judgement * tactic -> t
  exception RemainingSubgoals of judgement list

  (* extend a development with a custom tactic *)
  val defineTactic : t -> label * tactic -> t

  (* extend a development with a new operator *)
  val declareOperator : t -> label * Arity.t -> t
  val defineOperator : t -> {definiendum : pattern, definiens : term} -> t

  (* lookup the definiens *)
  val lookupDefinition : t -> label -> conv

  (* lookup the statement & evidence of a theorem *)
  val lookupTheorem : t -> label -> {statement : judgement, evidence : evidence Susp.susp}

  (* lookup a custom tactic *)
  val lookupTactic : t -> label -> tactic

  (* lookup a custom operator *)
  val lookupOperator : t -> label -> Arity.t
end

Add note to DEVELOPMENT sig

(* DEVELOPMENT models the aspect of Brouwer's Creating Subject which realizes
 * constructions over time. A value of type DEVELOPMENT.t is a stage in time at
 * which the knowledge of the creating subject may be queried, or to which new
 * knowledge may be added, resulting in another stage in time. In this sense,
 * the possible values of type DEVELOPMENT.t form a spread, whose law is
 * governed by the admissibility of new knowledge. *)

signature DEVELOPMENT =
sig
  type term
  type pattern
  type judgement
  type evidence

  type conv = term -> term
  type tactic

  structure Telescope : TELESCOPE
  type label = Telescope.label

  structure Object :
  sig
    type t
    val toString : label * t -> string
  end

  type t
  type object = Object.t

  val out : t -> object Telescope.telescope

  (* the empty development *)
  val empty : t

  (* extend a development with a theorem *)
  val prove : t -> label * judgement * tactic -> t
  exception RemainingSubgoals of judgement list

  (* extend a development with a custom tactic *)
  val defineTactic : t -> label * tactic -> t

  (* extend a development with a new operator *)
  val declareOperator : t -> label * Arity.t -> t
  val defineOperator : t -> {definiendum : pattern, definiens : term} -> t

  (* lookup the definiens *)
  val lookupDefinition : t -> label -> conv

  (* lookup the statement & evidence of a theorem *)
  val lookupTheorem : t -> label -> {statement : judgement, evidence : evidence Susp.susp}

  (* lookup a custom tactic *)
  val lookupTactic : t -> label -> tactic

  (* lookup a custom operator *)
  val lookupOperator : t -> label -> Arity.t
end


(* Some bugs in Word32 on 64-bit and a bug in arithmetic right shift
   with a constant shift value. *)

fun check a b = if a = b then () else raise Fail "Bad";

check(Word32.toIntX 0wx0) 0;
check(Word32.toIntX 0wx1) 1;
check(Word32.toIntX 0wx7FFFFFFF) 2147483647;
check(Word32.toIntX 0wx80000000) ~2147483648;
check(Word32.toIntX 0wx80000001) ~2147483647;
check(Word32.toIntX 0wxFFFFFFFE) ~2;
check(Word32.toIntX 0wxFFFFFFFF) ~1;

check(Word32.toLargeX 0wx0) 0wx0;
check(Word32.toLargeX 0wx1) 0wx1;
check(Word32.toLargeX 0wx7FFFFFFF) 0wx7FFFFFFF;

check (let val r = ref 0w4 in Word.~>>(!r, 0w1) end) 0w2;

Add missing newline at end of test.


viewport = {
	size: {
		width: 0
		height: 0
	}
}

<script module=viewport>

	var on = require('fun/node_modules/dom/on'),
		getWindowSize = require('fun/node_modules/dom/getWindowSize'),
		cleint = require('fun/node_modules/std/client')

	function update() {
		var size = getWindowSize(window)

		if ('orientation' in window) {
			if (window.orientation % 180 === 0) {
				size.height = screen.height - 64
				size.width = screen.width
			} else if (window.orientation % 90 === 0) {
				size.height = screen.width - 80
				size.width = screen.height
			}
		}

		module.set(['size','width'], fun.expressions.Number(size.width))
		module.set(['size','height'], fun.expressions.Number(size.height))

		document.body.scrollLeft = 0
	}

	on(window, 'orientationchange', update)
	on(window, 'resize', update)
	update()
</script>

Fix iOS landscape mode height detection

viewport = {
	size: {
		width: 0
		height: 0
	}
}

<script module=viewport>

	var on = require('fun/node_modules/dom/on'),
		getWindowSize = require('fun/node_modules/dom/getWindowSize'),
		cleint = require('fun/node_modules/std/client')

	function update() {
		var size = getWindowSize(window)

		if ('orientation' in window && (client.isIPhone || client.isIPod)) {
			if (window.orientation % 180 === 0) {
				size.height = screen.height - 64
				size.width = screen.width
			} else if (window.orientation % 90 === 0) {
				size.height = screen.width - 52
				size.width = screen.height
			}
		}

		module.set(['size','width'], fun.expressions.Number(size.width))
		module.set(['size','height'], fun.expressions.Number(size.height))

		document.body.scrollLeft = 0
	}

	on(window, 'orientationchange', update)
	on(window, 'resize', update)
	update()
</script>


(*
	Copyright (c) 2000
		Cambridge University Technical Services Limited

	This library is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License as published by the Free Software Foundation; either
	version 2.1 of the License, or (at your option) any later version.

	This library is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
	Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with this library; if not, write to the Free Software
	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*)

structure Structures =
  STRUCTURES_ (
    structure LEX        = Lex
    structure CODETREE   = CodeTree
    structure STRUCTVALS = StructVals
    structure VALUEOPS   = ValueOps
    structure TYPETREE   = TypeTree
    structure PARSETREE  = ParseTree
    structure UTILITIES  = Utilities
    structure PRETTYPRINTER = PrettyPrinter
    structure MISC       = Misc
    structure UNIVERSAL = Universal
    structure UNIVERSALTABLE = UniversalTable
    structure DEBUG      = Debug
    structure ADDRESS    = Address
    structure ARRAY      = Array
    structure STRETCHARRAY = StretchArray
	structure DEBUGGER   = Debugger
  );

Remove unused Address structure from functor arguments. Use Array structure as a global rather than passing as functor argument.

(*
	Copyright (c) 2000
		Cambridge University Technical Services Limited

	This library is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License as published by the Free Software Foundation; either
	version 2.1 of the License, or (at your option) any later version.

	This library is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
	Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with this library; if not, write to the Free Software
	Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*)

structure Structures =
  STRUCTURES_ (
    structure LEX        = Lex
    structure CODETREE   = CodeTree
    structure STRUCTVALS = StructVals
    structure VALUEOPS   = ValueOps
    structure TYPETREE   = TypeTree
    structure PARSETREE  = ParseTree
    structure UTILITIES  = Utilities
    structure PRETTYPRINTER = PrettyPrinter
    structure MISC       = Misc
    structure UNIVERSAL = Universal
    structure UNIVERSALTABLE = UniversalTable
    structure DEBUG      = Debug
    structure STRETCHARRAY = StretchArray
	structure DEBUGGER   = Debugger
  );


(*
    Copyright (c) 2007-16 David C.J. Matthews

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License version 2.1 as published by the Free Software Foundation.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*)

structure CompilerVersion =
struct
   val compilerVersion = "5.6.0b Post-RTS and string changes"
   val versionNumber = 560
   val versionSuffix = Int.toString versionNumber
end;

Return new version to 5.6.1.

(*
    Copyright (c) 2007-16 David C.J. Matthews

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License version 2.1 as published by the Free Software Foundation.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*)

structure CompilerVersion =
struct
   val compilerVersion = "5.6.1 Testing"
   val versionNumber = 561
   val versionSuffix = Int.toString versionNumber
end;


let test = 'test'
test
"ASD"

let something = 1123
let somethingBig = 999.99e10

	"Hi " "Marcus"
	"How are you?"
	test "?"

Add example code for an if statement

let test = 'test'
test
"ASD"

let something = 1123
let somethingBig = 999.99e10

	"Hi " "Marcus"
	"How are you?"
	test "?"

if (something) {

    	"Hi " "Marcus"
    	something "How are you?"
    	test "?"

}


let addItem = handler() {
	Local.items.push('new item')
}

<button onClick=addItem>"Add item"</button>

 "Items:"

for (item in Local.items) {

 "item: " item

}

Change the for loop example to be a bit more relevant

let addItem = handler() { Global.items.push(Local.text) }
let containerStyle = { padding: 5, margin: 5, border: '1px solid' }

	<input data=Global.foo />

 "Global.foo: " Global.foo

	"Add item with text: " <input data=Local.text />

 <button onClick=addItem>"Add item: " Local.text</button>

	"Global.items:"

		for (item in Global.items) {

 "item: " item

		}


(* IPv6 test - Test078 converted to IPv6 *)
val x = INet6Sock.TCP.socket(): Socket.passive INet6Sock.stream_sock
and y = INet6Sock.TCP.socket(): Socket.active INet6Sock.stream_sock;
val SOME me = Net6HostDB.getByName "localhost";
val localhost = Net6HostDB.addr me;
Socket.bind(x, INet6Sock.toAddr(localhost, 0));
Socket.listen(x, 5);
let
val (_, port) = INet6Sock.fromAddr(Socket.Ctl.getSockName x)
in
Socket.connect(y, INet6Sock.toAddr(localhost, port))
end;
val (cnct, _) = Socket.accept x;

(* Send the data. Use a separate thread so there's no possibility of blocking. *)
let
    fun sendData() =
        (Socket.sendVec(y, Word8VectorSlice.full(Byte.stringToBytes "A test")); ())
in
    Thread.Thread.fork(sendData, [])
end;

if Byte.bytesToString(Socket.recvVec(cnct, 6)) <> "A test"
then raise Fail "failed"
else ();

Socket.close cnct;
Socket.close x;
Socket.close y;

Modify IPv6 test so that it raises NotApplicable if IPv6 is not configured.

(* IPv6 test - Test078 converted to IPv6 *)
val x = INet6Sock.TCP.socket(): Socket.passive INet6Sock.stream_sock
and y = INet6Sock.TCP.socket(): Socket.active INet6Sock.stream_sock;

(* IPv6 may not be configured but it's not clear where the error will occur. *)
val me = case Net6HostDB.getByName "localhost" of SOME me => me | NONE => raise NotApplicable;

val localhost = Net6HostDB.addr me;

Socket.bind(x, INet6Sock.toAddr(localhost, 0))
    handle exn as OS.SysErr(_, SOME e) =>
      (case OS.syserror "EADDRNOTAVAIL" of
        SOME f => if e = f then raise NotApplicable else raise exn | NONE => raise exn);

Socket.listen(x, 5);
let
val (_, port) = INet6Sock.fromAddr(Socket.Ctl.getSockName x)
in
Socket.connect(y, INet6Sock.toAddr(localhost, port))
end;
val (cnct, _) = Socket.accept x;

(* Send the data. Use a separate thread so there's no possibility of blocking. *)
let
    fun sendData() =
        (Socket.sendVec(y, Word8VectorSlice.full(Byte.stringToBytes "A test")); ())
in
    Thread.Thread.fork(sendData, [])
end;

if Byte.bytesToString(Socket.recvVec(cnct, 6)) <> "A test"
then raise Fail "failed"
else ();

Socket.close cnct;
Socket.close x;
Socket.close y;