Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual Conversion #18588

Merged
merged 95 commits into from
Dec 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
a1e14c4
Setup new directory structure in doc/
MichaelHatherly Dec 7, 2016
20336ae
Update README in the doc/ directory
MichaelHatherly Dec 7, 2016
becd19d
Rename and move all .rst files to .md ones
MichaelHatherly Dec 7, 2016
8d47ac8
Add Julia logo
MichaelHatherly Dec 7, 2016
7f510ec
Convert doc/src/manual/arrays
MichaelHatherly Dec 7, 2016
ef6648c
Convert doc/src/manual/calling-c-and-fortran-code
MichaelHatherly Dec 7, 2016
92fb84c
Convert doc/src/manual/complex-and-rational-numbers
MichaelHatherly Dec 7, 2016
53811ff
Convert doc/src/manual/constructors
MichaelHatherly Dec 7, 2016
505cdd9
Convert doc/src/manual/control-flow
MichaelHatherly Dec 7, 2016
100fb02
Convert doc/src/manual/conversion-and-promotion
MichaelHatherly Dec 7, 2016
002bd73
Convert doc/src/manual/dates
MichaelHatherly Dec 7, 2016
74e7764
Convert doc/src/manual/documentation
MichaelHatherly Dec 7, 2016
d88c3c5
Convert doc/src/manual/embedding
MichaelHatherly Dec 7, 2016
04fc039
Convert doc/src/manual/faq
MichaelHatherly Dec 7, 2016
b4f4525
Convert doc/src/manual/functions
MichaelHatherly Dec 7, 2016
5e17741
Convert doc/src/manual/getting-started
MichaelHatherly Dec 7, 2016
1da93f3
Convert doc/src/manual/handling-operating-system-variation
MichaelHatherly Dec 7, 2016
a43c921
Convert doc/src/manual/index
MichaelHatherly Dec 7, 2016
fa04dc4
Convert doc/src/manual/integers-and-floating-point-numbers
MichaelHatherly Dec 7, 2016
ed4ab64
Convert doc/src/manual/interacting-with-julia
MichaelHatherly Dec 7, 2016
f2107d3
Convert doc/src/manual/interfaces
MichaelHatherly Dec 7, 2016
e0de340
Convert doc/src/manual/introduction
MichaelHatherly Dec 7, 2016
d47b40e
Convert doc/src/manual/linear-algebra
MichaelHatherly Dec 7, 2016
e32b45f
Convert doc/src/manual/mathematical-operations
MichaelHatherly Dec 7, 2016
454ace8
Convert doc/src/manual/metaprogramming
MichaelHatherly Dec 7, 2016
679e136
Convert doc/src/manual/methods
MichaelHatherly Dec 7, 2016
f86ab7a
Convert doc/src/manual/modules
MichaelHatherly Dec 7, 2016
fba60de
Convert doc/src/manual/networking-and-streams
MichaelHatherly Dec 7, 2016
ff846a8
Convert doc/src/manual/noteworthy-differences
MichaelHatherly Dec 7, 2016
0d65411
Convert doc/src/manual/packages
MichaelHatherly Dec 7, 2016
0b6f736
Convert doc/src/manual/parallel-computing
MichaelHatherly Dec 7, 2016
1f1f668
Convert doc/src/manual/performance-tips
MichaelHatherly Dec 7, 2016
0163ce8
Convert doc/src/manual/profile
MichaelHatherly Dec 7, 2016
f0abd07
Convert doc/src/manual/running-external-programs
MichaelHatherly Dec 7, 2016
a41cc4a
Convert doc/src/manual/stacktraces
MichaelHatherly Dec 7, 2016
36d07ae
Convert doc/src/manual/strings
MichaelHatherly Dec 7, 2016
e94288a
Convert doc/src/manual/style-guide
MichaelHatherly Dec 7, 2016
46f1efa
Convert doc/src/manual/types
MichaelHatherly Dec 7, 2016
de3f705
Convert doc/src/manual/unicode-input
MichaelHatherly Dec 7, 2016
2341ca3
Convert doc/src/manual/variables-and-scoping
MichaelHatherly Dec 7, 2016
cbb6124
Convert doc/src/manual/variables
MichaelHatherly Dec 7, 2016
a40eb3b
Convert doc/src/manual/workflow-tips
MichaelHatherly Dec 7, 2016
177bdbf
Convert doc/src/stdlib/arrays
MichaelHatherly Dec 7, 2016
3ab2174
Convert doc/src/stdlib/base
MichaelHatherly Dec 7, 2016
6c44fbe
Convert doc/src/stdlib/c
MichaelHatherly Dec 7, 2016
3276c6a
Convert doc/src/stdlib/collections
MichaelHatherly Dec 7, 2016
2e88791
Convert doc/src/stdlib/constants
MichaelHatherly Dec 7, 2016
63c89cf
Convert doc/src/stdlib/dates
MichaelHatherly Dec 7, 2016
eb940fa
Convert doc/src/stdlib/file
MichaelHatherly Dec 7, 2016
b21cd89
Convert doc/src/stdlib/index
MichaelHatherly Dec 7, 2016
c4c515b
Convert doc/src/stdlib/io-network
MichaelHatherly Dec 7, 2016
c3cb729
Convert doc/src/stdlib/iterators
MichaelHatherly Dec 7, 2016
ba1a672
Convert doc/src/stdlib/libc
MichaelHatherly Dec 7, 2016
e478fe0
Convert doc/src/stdlib/libdl
MichaelHatherly Dec 7, 2016
a48c67c
Convert doc/src/stdlib/linalg
MichaelHatherly Dec 7, 2016
aa6078c
Convert doc/src/stdlib/math
MichaelHatherly Dec 7, 2016
2e9d4f8
Convert doc/src/stdlib/numbers
MichaelHatherly Dec 7, 2016
ac38d3a
Convert doc/src/stdlib/parallel
MichaelHatherly Dec 7, 2016
2b40b77
Convert doc/src/stdlib/pkg
MichaelHatherly Dec 7, 2016
c878340
Convert doc/src/stdlib/profile
MichaelHatherly Dec 7, 2016
4dae035
Convert doc/src/stdlib/punctuation
MichaelHatherly Dec 7, 2016
017a9f7
Convert doc/src/stdlib/simd-types
MichaelHatherly Dec 7, 2016
ae1de4d
Convert doc/src/stdlib/sort
MichaelHatherly Dec 7, 2016
b43dff4
Convert doc/src/stdlib/stacktraces
MichaelHatherly Dec 7, 2016
c244c0e
Convert doc/src/stdlib/strings
MichaelHatherly Dec 7, 2016
da67cb6
Convert doc/src/stdlib/test
MichaelHatherly Dec 7, 2016
134ac3a
Convert doc/src/devdocs/ast
MichaelHatherly Dec 7, 2016
2abbdfa
Convert doc/src/devdocs/backtraces
MichaelHatherly Dec 7, 2016
94de094
Convert doc/src/devdocs/boundscheck
MichaelHatherly Dec 7, 2016
435d925
Convert doc/src/devdocs/callconv
MichaelHatherly Dec 7, 2016
0341030
Convert doc/src/devdocs/cartesian
MichaelHatherly Dec 7, 2016
1df1d1e
Convert doc/src/devdocs/C
MichaelHatherly Dec 7, 2016
ae6d027
Convert doc/src/devdocs/debuggingtips
MichaelHatherly Dec 7, 2016
aebc200
Convert doc/src/devdocs/eval
MichaelHatherly Dec 7, 2016
b69a5fd
Convert doc/src/devdocs/functions
MichaelHatherly Dec 7, 2016
d8f5b4e
Convert doc/src/devdocs/init
MichaelHatherly Dec 7, 2016
cc40c6a
Convert doc/src/devdocs/julia
MichaelHatherly Dec 7, 2016
0d74803
Convert doc/src/devdocs/llvm
MichaelHatherly Dec 7, 2016
b0fb710
Convert doc/src/devdocs/locks
MichaelHatherly Dec 7, 2016
5e9a2c4
Convert doc/src/devdocs/meta
MichaelHatherly Dec 7, 2016
c659571
Convert doc/src/devdocs/object
MichaelHatherly Dec 7, 2016
33be9c3
Convert doc/src/devdocs/offset-arrays
MichaelHatherly Dec 7, 2016
1e39955
Convert doc/src/devdocs/reflection
MichaelHatherly Dec 7, 2016
eb722cb
Convert doc/src/devdocs/sanitizers
MichaelHatherly Dec 7, 2016
226e12a
Convert doc/src/devdocs/stdio
MichaelHatherly Dec 7, 2016
c4ea3a0
Convert doc/src/devdocs/subarrays
MichaelHatherly Dec 7, 2016
bb62572
Convert doc/src/devdocs/sysimg
MichaelHatherly Dec 7, 2016
5cff3ab
Convert doc/src/devdocs/types
MichaelHatherly Dec 7, 2016
08338b7
Convert doc/src/devdocs/valgrind
MichaelHatherly Dec 7, 2016
105624a
Convert doc/src/index
MichaelHatherly Dec 7, 2016
1c58e98
Add Documenter 'make.jl' build file
MichaelHatherly Dec 7, 2016
bd35156
Fix autolinks in /base
MichaelHatherly Dec 7, 2016
b1d015a
Remove unused files from doc/ directory
MichaelHatherly Dec 7, 2016
abddf00
Update Makefiles for Sphinx to Documenter.jl changes
MichaelHatherly Dec 7, 2016
421633d
Update documentation section of CONTRIBUTING.md
MichaelHatherly Dec 7, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 63 additions & 40 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,59 +100,80 @@ Coveralls shows functionality that still needs "proof of concept" tests. These a

*By contributing documentation to Julia, you are agreeing to release it under the [MIT License](https://github.com/JuliaLang/julia/tree/master/LICENSE.md).*

Julia's documentation is stored in the `doc` directory, and like everything else can be modified using `git`.
Julia's documentation source files are stored in the `doc/` directory and all docstrings are found in `base/`. Like everything else these can be modified using `git`. Documentation is built with [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl), which uses Markdown syntax. The HTML documentation can be built locally by running

Julia's documentation is built with [Sphinx](http://sphinx-doc.org/contents.html), which supports (and Julia's docs rely heavily on) [ReST directives](http://docutils.sourceforge.net/docs/ref/rst/directives.html). To build the documentation locally, run
```
make docs
```

make -C doc html
from Julia's root directory. This will rebuild the Julia system image, then install or update the package dependencies required to build the documentation, and finally build the HTML documentation and place the resulting files in `doc/_build/html/`.

or
> **Note**
>
> When making changes to any of Julia's documentation it is recommended that you run `make docs` to check the your changes are valid and do not produce any errors before opening a pull request.

make -C doc latex
Below are outlined the three most common types of documentation changes and the steps required to perform them. Please note that the following instructions do not cover the full range of features provided by Documenter.jl. Refer to [Documenter's documentation](https://juliadocs.github.io/Documenter.jl/stable/) if you encounter anything that is not covered by the sections below.

from Julia's root directory. Sometimes errors only show up in one of them, so if you're preparing a pull request it is nice if you've checked both formats before you submit.
#### Modifying files in `doc/src/`

Existing docstrings now live primarily in `base/docs/helpdb.jl`.
It is a goal over time to move the docstrings inline to their respective method definitions.
If you want to edit the body of a method docstring, run the `doc/genstdlib.jl` script to regenerate the restructured text files **after** you have already rebuilt Julia.
(From the top-level source directory, you can do this with `make julia-genstdlib`.)
If you want to edit an existing docstring signature, you **first** have to change the signature in the `doc/stdlib` `..function` or `..data` definition (not the auto-generated content) and *then*
edit the helpdb.jl or inline method docstrings. The existing signatures in the `doc/stdlib/*.rst` files are pattern matched to base docstrings and the new content overwrites the content in `doc/stdlib/`.
The signature definitions **must** be in sync or else the pattern match will fail and documentation will be lost in the result.
To add entirely new methods to the `stdlib` documentation, first add the signature in the appropriate `doc/stdlib/*.rst` file before writing the docstring, rebuilding Julia, and re-running `doc/genstdlib.jl`.
Pattern matching requires that multiline method signatures' inter-line character alignment in `doc/stdlib/*.rst` match that in the corresponding docstring. In the following example,
Most of the source text for the Julia Manual is located in `doc/src/`. To update or add new text to any one of the existing files the following steps should be followed:

```julia
"""
foo(bar, baz,
qux, quux)
1. update the text in whichever `.md` files are applicable;
2. run `make docs` from the root directory;
3. check the output in `doc/_build/html/` to make sure the changes are correct;
4. commit your changes and open a pull request.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be emphasized that the nothing in the _build directory is supposed to be commited?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, can do. _build is in the .gitignore so it's probably not really necessary, but probably worth mentioning anyway.


Foo `bar`, `baz`, `qux`, and `quux`.
"""
```
> **Note**
>
> The contents of `doc/_build/` does **not** need to be committed when you make changes.

will only match entries in `doc/stdlib/*.rst` beginning with
To add a **new file** to `doc/src/` rather than updating a file replace step `1` above with

```
.. function:: foo(bar, baz,
qux, quux)
```
1. add the file to the appropriate subdirectory in `doc/src/` and also add the file path to the `PAGES` vector in `doc/make.jl`.

Note that the second line of the signature is indented by four spaces relative to `foo(bar, baz,`
in the first line of the signature. This leading indent matches the indent used in the
docstring exactly. If it did not match, such as in the following example,
#### Modifying an existing docstring in `base/`

```
.. function:: foo(bar, baz,
qux, quux)
```
All docstrings are written inline above the methods or types they are associated with and can be found by clicking on the `source` link that appears below each docstring in the HTML file. The steps needed to make a change to an existing docstring are listed below:

1. find the docstring in `base/`;
2. update the text in the docstring;
3. run `make docs` from the root directory;
4. check the output in `doc/_build/html/` to make sure the changes are correct;
5. commit your changes and open a pull request.

> **Note**
>
> Currently there are a large number of docstrings found in `base/docs/helpdb/Base.jl`. When any of these docstrings are modified please move them out of this file and place them above the most appropriate definition in one of the `base/` source files.

where three spaces instead of four are used then running `genstdlib.jl` will print a warning
and not update the docstring.
#### Adding a new docstring to `base/`

It is encouraged to write all new docstrings in Markdown markup. If you need to write a more complicated docstring that contains cross-references or citations it can be written in a restructured text codeblock.
Many of the existing docstrings are currently restructured text codeblocks and these will be transitioned to Markdown over time. RST codeblocks are delineated with the triple-quote (\`\`\`rst \`\`\`) Makdown codeblock syntax.
The content of the codeblock is spliced directly into the final restructured text document unmodified.
The steps required to add a new docstring are listed below:

1. find a suitable definition in `base/` that the docstring will be most applicable to;
2. add a docstring above the definition;
3. find a suitable `@docs` code block in one of the `doc/src/stdlib/` files where you would like the docstring to appear;
4. add the name of the definition to the `@docs` code block. For example, with a docstring added to a function `bar`

```julia
"..."
function bar(args...)
# ...
end
```

you would add the name `bar` to a `@docs` block in `doc/src/stdlib/`

```@docs
foo
bar # <-- Added this one.
baz
```

5. run `make docs` from the root directory;
6. check the output in `doc/_build/html` to make sure the changes are correct;
7. commit your changes and open a pull request.

#### Doctests

Examples written within docstrings can be used as testcases known as "doctests" by annotating code blocks with `jldoctest`.

Expand All @@ -161,7 +182,9 @@ Examples written within docstrings can be used as testcases known as "doctests"
"DOCSTRING TEST"
```

A doctest needs to match an interactive REPL including the `julia>` prompt. To run doctests you first run `make julia-genstdlib` then `make -C doc doctest`.
A doctest needs to match an interactive REPL including the `julia>` prompt. To run doctests you need to run `make -C doc check` from the root directory.

#### News-worthy changes

For new functionality and other substantial changes, add a brief summary to `NEWS.md`. The news item should cross reference the pull request (PR) parenthetically, in the form `([#pr])`; after adding this, run `./julia doc/NEWS-update.jl` from the `julia` directory to update the cross-reference links. To add the PR reference number, first create the PR, then push an additional commit updating `NEWS.md` with the PR reference number.

Expand Down
25 changes: 6 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ julia-debug julia-release : julia-% : julia-ui-% julia-sysimg-% julia-symlink ju

debug release : % : julia-%

julia-genstdlib: julia-sysimg-$(JULIA_BUILD_MODE)
@$(call PRINT_JULIA, $(JULIA_EXECUTABLE) $(call cygpath_w, $(JULIAHOME)/doc/genstdlib.jl))

docs: julia-genstdlib
docs: julia-sysimg-$(JULIA_BUILD_MODE)
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/doc

check-whitespace:
Expand All @@ -120,21 +117,11 @@ endif

release-candidate: release testall
@$(JULIA_EXECUTABLE) $(JULIAHOME)/contrib/add_license_to_files.jl #add license headers
@$(JULIA_EXECUTABLE) $(JULIAHOME)/doc/genstdlib.jl
@#Check documentation
@$(JULIA_EXECUTABLE) $(JULIAHOME)/doc/NEWS-update.jl #Add missing cross-references to NEWS.md
@$(MAKE) -C $(BUILDROOT)/doc unicode #Rebuild Unicode table if necessary
@$(JULIA_EXECUTABLE) $(JULIAHOME)/doc/DocCheck.jl > $(BUILDROOT)/doc/UNDOCUMENTED.rst 2>&1 #Check for undocumented items
@if [ -z "$(cat $(BUILDROOT)/doc/UNDOCUMENTED.rst)" ]; then \
rm $(BUILDROOT)/doc/UNDOCUMENTED.rst; \
else \
echo "Undocumented functions found in doc/UNDOCUMENTED.rst; document them, then retry"; \
exit 1; \
fi
@$(MAKE) -C $(BUILDROOT)/doc html SPHINXOPTS="-n" #Rebuild Julia HTML docs pedantically
@$(MAKE) -C $(BUILDROOT)/doc latex SPHINXOPTS="-n" #Rebuild Julia PDF docs pedantically
@$(MAKE) -C $(BUILDROOT)/doc doctest #Run Julia doctests
@$(MAKE) -C $(BUILDROOT)/doc linkcheck #Check all links
@$(MAKE) -C $(BUILDROOT)/doc html
@$(MAKE) -C $(BUILDROOT)/doc pdf
@$(MAKE) -C $(BUILDROOT)/doc check
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use strict mode here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check calls make.jl with doctest, linkcheck, and strict arguments, so should be strict enough.


@# Check to see if the above make invocations changed anything important
@if [ -n "$$(git status --porcelain)" ]; then \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we port this or is this totally bitrotted and useless right now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documenter provides pretty much the same features for checking for missing docs. Should be fine to remove.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this never actually did anything since it's just defining a module but not running any of the code it defines

Expand Down Expand Up @@ -329,8 +316,9 @@ define stringreplace
$(build_depsbindir)/stringreplace $$(strings -t x - $1 | grep '$2' | awk '{print $$1;}') '$3' 255 "$(call cygpath_w,$1)"
endef

install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html
install: $(build_depsbindir)/stringreplace
@$(MAKE) $(QUIET_MAKE) all
@$(MAKE) $(QUIET_MAKE) docs
@for subdir in $(bindir) $(libexecdir) $(datarootdir)/julia/site/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir); do \
mkdir -p $(DESTDIR)$$subdir; \
done
Expand Down Expand Up @@ -379,7 +367,6 @@ endif
# Copy documentation
cp -R -L $(build_docdir)/* $(DESTDIR)$(docdir)/
cp -R -L $(BUILDROOT)/doc/_build/html $(DESTDIR)$(docdir)/
-rm $(DESTDIR)$(docdir)/html/.buildinfo
# Remove perf suite
-rm -rf $(DESTDIR)$(datarootdir)/julia/test/perf/
# Remove various files which should not be installed
Expand Down
2 changes: 1 addition & 1 deletion base/Enums.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ end
"""
@enum EnumName EnumValue1[=x] EnumValue2[=y]

Create an [`Enum`](:obj:`Enum`) type with name `EnumName` and enum member values of
Create an `Enum` type with name `EnumName` and enum member values of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there going to be autodetection of some kind for references like these?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enum itself doesn't actually have a docstring, only @enum does. For some reason sphinx didn't ever complain about that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re: autodetection, I think we can probably add, at some point, a check to Documenter that will suggest non-references that could be references.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. Was this the case for all of the ones you removed in this commit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there's a whole bunch that aren't links any more: Integer, Real, Rational, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And none of those types have docstrings?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly for UInt, Int, Float16 types. I think seems like this could be fixed in a later PR. Linking every type_name automatically seems like a neat Documenter feature!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those ones as well. What I'll do is put together a list of which ones are missing after this conversion is done and open an up-for-grabs issue to track which ones still need documenting.

`EnumValue1` and `EnumValue2` with optional assigned values of `x` and `y`, respectively.
`EnumName` can be used just like other types and enum member values as regular values, such as

Expand Down
16 changes: 8 additions & 8 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ linearindexing(::LinearIndexing, ::LinearIndexing) = LinearSlow()
Return `true` if the specified indices `I` are in bounds for the given
array `A`. Subtypes of `AbstractArray` should specialize this method
if they need to provide custom bounds checking behaviors; however, in
many cases one can rely on `A`'s indices and [`checkindex`](:func:`checkindex`).
many cases one can rely on `A`'s indices and [`checkindex`](@ref).

See also [`checkindex`](:func:`checkindex`).
See also [`checkindex`](@ref).
"""
function checkbounds(::Type{Bool}, A::AbstractArray, I...)
@_inline_meta
Expand Down Expand Up @@ -304,7 +304,7 @@ usually in a 1-for-1 fashion,
checkbounds_indices(Bool, (IA1, IA...), (I1, I...)) = checkindex(Bool, IA1, I1) &
checkbounds_indices(Bool, IA, I)

Note that [`checkindex`](:func:`checkindex`) is being used to perform the actual
Note that [`checkindex`](@ref) is being used to perform the actual
bounds-check for a single dimension of the array.

There are two important exceptions to the 1-1 rule: linear indexing and
Expand Down Expand Up @@ -714,8 +714,8 @@ A[iter] = 0
```

If you supply more than one `AbstractArray` argument, `eachindex` will create an
iterable object that is fast for all arguments (a [`UnitRange`](:obj:`UnitRange`)
if all inputs have fast linear indexing, a [`CartesianRange`](:obj:`CartesianRange`)
iterable object that is fast for all arguments (a `UnitRange`
if all inputs have fast linear indexing, a `CartesianRange`
otherwise).
If the arrays have different sizes and/or dimensionalities, `eachindex` returns an
iterable that spans the largest range along each dimension.
Expand Down Expand Up @@ -1512,7 +1512,7 @@ sub2ind(::Tuple{}, I::Integer...) = (@_inline_meta; _sub2ind((), 1, 1, I...))
"""
sub2ind(dims, i, j, k...) -> index

The inverse of [`ind2sub`](:func:`ind2sub`), returns the linear index corresponding to the provided subscripts.
The inverse of [`ind2sub`](@ref), returns the linear index corresponding to the provided subscripts.

```jldoctest
julia> sub2ind((5,6,7),1,2,3)
Expand Down Expand Up @@ -1789,7 +1789,7 @@ promote_eltype_op(op, A, B, C, D...) = (@_pure_meta; promote_eltype_op(op, eltyp
"""
map!(function, collection)

In-place version of [`map`](:func:`map`).
In-place version of [`map`](@ref).
"""
map!{F}(f::F, A::AbstractArray) = map!(f, A, A)
function map!{F}(f::F, dest::AbstractArray, A::AbstractArray)
Expand Down Expand Up @@ -1848,7 +1848,7 @@ end
"""
map!(function, destination, collection...)

Like [`map`](:func:`map`), but stores the result in `destination` rather than a new
Like [`map`](@ref), but stores the result in `destination` rather than a new
collection. `destination` must be at least as large as the first collection.
"""
map!{F}(f::F, dest::AbstractArray, As::AbstractArray...) = map_n!(f, dest, As)
Expand Down
2 changes: 1 addition & 1 deletion base/abstractarraymath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ julia> circshift(b, (-1,0))
1 5 9 13
```

See also [`circshift!`](:func:`circshift!`).
See also [`circshift!`](@ref).
"""
function circshift(a::AbstractArray, shiftamt)
circshift!(similar(a), a, map(Integer, (shiftamt...,)))
Expand Down
2 changes: 1 addition & 1 deletion base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ julia> eye(A)
0 0 1
```

Note the difference from [`ones`](:func:`ones`).
Note the difference from [`ones`](@ref).
"""
eye{T}(x::AbstractMatrix{T}) = eye(T, size(x, 1), size(x, 2))

Expand Down
2 changes: 1 addition & 1 deletion base/arraymath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Transform an array to its complex conjugate in-place.

See also [`conj`](:func:`conj`).
See also [`conj`](@ref).
"""
function conj!{T<:Number}(A::AbstractArray{T})
for i in eachindex(A)
Expand Down
6 changes: 3 additions & 3 deletions base/associative.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ end
merge!(d::Associative, others::Associative...)

Update collection with pairs from the other collections.
See also [`merge`](:func:`merge`).
See also [`merge`](@ref).
"""
function merge!(d::Associative, others::Associative...)
for other in others
Expand All @@ -138,7 +138,7 @@ end
"""
keytype(type)

Get the key type of an associative collection type. Behaves similarly to [`eltype`](:func:`eltype`).
Get the key type of an associative collection type. Behaves similarly to [`eltype`](@ref).
"""
keytype{K,V}(::Type{Associative{K,V}}) = K
keytype(a::Associative) = keytype(typeof(a))
Expand All @@ -147,7 +147,7 @@ keytype{A<:Associative}(::Type{A}) = keytype(supertype(A))
"""
valtype(type)

Get the value type of an associative collection type. Behaves similarly to [`eltype`](:func:`eltype`).
Get the value type of an associative collection type. Behaves similarly to [`eltype`](@ref).
"""
valtype{K,V}(::Type{Associative{K,V}}) = V
valtype{A<:Associative}(::Type{A}) = valtype(supertype(A))
Expand Down
4 changes: 2 additions & 2 deletions base/asyncmap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@ asyncmap(f, c...) = collect(AsyncGenerator(f, c...))
"""
asyncmap!(f, c)

In-place version of [`asyncmap()`](:func:`asyncmap`).
In-place version of [`asyncmap()`](@ref).
"""
asyncmap!(f, c) = (for x in AsyncCollector(f, c, c) end; c)


"""
asyncmap!(f, results, c...)

Like [`asyncmap()`](:func:`asyncmap`), but stores output in `results` rather returning a collection.
Like [`asyncmap()`](@ref), but stores output in `results` rather returning a collection.
"""
asyncmap!(f, r, c1, c...) = (for x in AsyncCollector(f, r, c1, c...) end; r)
6 changes: 3 additions & 3 deletions base/base64.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export Base64EncodePipe, Base64DecodePipe, base64encode, base64decode

Returns a new write-only I/O stream, which converts any bytes written to it into
base64-encoded ASCII bytes written to `ostream`.
Calling [`close`](:func:`close`) on the `Base64EncodePipe` stream
Calling [`close`](@ref) on the `Base64EncodePipe` stream
is necessary to complete the encoding (but does not close `ostream`).
"""
type Base64EncodePipe <: IO
Expand Down Expand Up @@ -166,10 +166,10 @@ end
base64encode(writefunc, args...)
base64encode(args...)

Given a [`write`](:func:`write`)-like function `writefunc`, which takes an I/O stream as its first argument,
Given a [`write`](@ref)-like function `writefunc`, which takes an I/O stream as its first argument,
`base64encode(writefunc, args...)` calls `writefunc` to write `args...` to a base64-encoded
string, and returns the string. `base64encode(args...)` is equivalent to `base64encode(write, args...)`:
it converts its arguments into bytes using the standard [`write`](:func:`write`) functions and returns the
it converts its arguments into bytes using the standard [`write`](@ref) functions and returns the
base64-encoded string.
"""
function base64encode(f::Function, args...)
Expand Down
8 changes: 4 additions & 4 deletions base/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ end
BitArray{N}(dims::NTuple{N,Int})

Construct an uninitialized `BitArray` with the given dimensions.
Behaves identically to the [`Array`](:func:`Array`) constructor.
Behaves identically to the [`Array`](@ref) constructor.
"""
BitArray(dims::Integer...) = BitArray(map(Int,dims))
BitArray{N}(dims::NTuple{N,Int}) = BitArray{N}(dims...)
Expand Down Expand Up @@ -1187,7 +1187,7 @@ end
"""
flipbits!(B::BitArray{N}) -> BitArray{N}

Performs a bitwise not operation on `B`. See [`~`](:ref:`~ operator <~>`).
Performs a bitwise not operation on `B`. See [`~`](@ref).

```jldoctest
julia> A = trues(2,2)
Expand Down Expand Up @@ -1632,7 +1632,7 @@ rol!(B::BitVector, i::Integer) = rol!(B, B, i)

Performs a left rotation operation, returning a new `BitVector`.
`i` controls how far to rotate the bits.
See also [`rol!`](:func:`rol!`).
See also [`rol!`](@ref).

```jldoctest
julia> A = BitArray([true, true, false, false, true])
Expand Down Expand Up @@ -1701,7 +1701,7 @@ ror!(B::BitVector, i::Integer) = ror!(B, B, i)

Performs a right rotation operation on `B`, returning a new `BitVector`.
`i` controls how far to rotate the bits.
See also [`ror!`](:func:`ror!`).
See also [`ror!`](@ref).

```jldoctest
julia> A = BitArray([true, true, false, false, true])
Expand Down
Loading