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

Remove no longer accurate documentation about Base.call #15231

Merged
merged 4 commits into from
Feb 26, 2016
Merged
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -106,7 +106,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) $(JULIAHOME)/doc/genstdlib.jl)
@$(call PRINT_JULIA, $(JULIA_EXECUTABLE) $(call cygpath_w, $(JULIAHOME)/doc/genstdlib.jl))

docs: julia-genstdlib
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/doc
2 changes: 1 addition & 1 deletion base/docs/Docs.jl
Original file line number Diff line number Diff line change
@@ -483,7 +483,7 @@ function moddoc(meta, def, def′)
block = def.args[3].args
if !def.args[1]
isempty(block) && error("empty baremodules are not documentable.")
insert!(block, 2, :(import Base: call, @doc))
insert!(block, 2, :(import Base: @doc))
end
push!(block, docex)
esc(Expr(:toplevel, def))
2 changes: 1 addition & 1 deletion base/docs/basedocs.jl
Original file line number Diff line number Diff line change
@@ -130,7 +130,7 @@ end

@keyword(
"""
`baremodule` declares a module that does not contain `using Base`, `import Base.call`,
`baremodule` declares a module that does not contain `using Base`
or a definition of `eval`. It does still import `Core`.
""",
:baremodule
10 changes: 5 additions & 5 deletions doc/manual/arrays.rst
Original file line number Diff line number Diff line change
@@ -221,7 +221,7 @@ Generator Expressions
Comprehensions can also be written without the enclosing square brackets, producing
an object known as a generator. This object can be iterated to produce values on
demand, instead of allocating an array and storing them in advance
(see :ref:`_man-interfaces-iteration`).
(see <man-interfaces-iteration>).
For example, the following expression sums a series without allocating memory::

.. doctest::
@@ -242,10 +242,10 @@ parentheses lets us add a third argument to ``map``::

julia> map(tuple, (1/(i+j) for i=1:2, j=1:2), [1:4;])
4-element Array{Any,1}:
(0.5,1)
(0.333333,2)
(0.333333,3)
(0.25,4)
(0.5,1)
(0.333333,2)
(0.333333,3)
(0.25,4)

.. _man-array-indexing:

4 changes: 2 additions & 2 deletions doc/manual/documentation.rst
Original file line number Diff line number Diff line change
@@ -289,15 +289,15 @@ is the preferred syntax, however both are equivalent.
baremodule M
import Base: call, @doc
import Base: @doc
"..."
f(x) = x
end
Documenting a ``baremodule`` by placing a docstring above the expression automatically
imports ``call`` and ``@doc`` into the module. These imports must be done manually when the
imports ``@doc`` into the module. These imports must be done manually when the
module expression is not documented. Empty ``baremodule``\ s cannot be documented.

Global Variables
8 changes: 2 additions & 6 deletions doc/manual/modules.rst
Original file line number Diff line number Diff line change
@@ -162,10 +162,8 @@ contain ``using Base``, since this is needed in the vast majority of cases.
Default top-level definitions and bare modules
----------------------------------------------

In addition to ``using Base``, modules also perform ``import Base.call`` by
default, to facilitate adding constructors to new types.
A new module also automatically contains a definition of the ``eval`` function,
which evaluates expressions within the context of that module.
In addition to ``using Base``, modules also automatically contain a definition
of the ``eval`` function, which evaluates expressions within the context of that module.

If these default definitions are not wanted, modules can be defined using the
keyword ``baremodule`` instead (note: ``Core`` is still imported, as per above).
@@ -175,8 +173,6 @@ In terms of ``baremodule``, a standard ``module`` looks like this::

using Base

import Base.call

eval(x) = Core.eval(Mod, x)
eval(m,x) = Core.eval(m, x)