Skip to content

Commit

Permalink
add a couple missing exports, and discontinue subtypetree. ref JuliaL…
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Feb 4, 2015
1 parent 1313fb7 commit afed989
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
7 changes: 7 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,10 @@ const base64 = base64encode

#9295
@deprecate push!(t::Associative, key, v) setindex!(t, v, key)

# 0.4 discontinued functions

function subtypetree(x::DataType, level=-1)
depwarn("`subtypetree` is discontinued", :subtypetree)
(level == 0 ? (x, []) : (x, Any[subtypetree(y, level-1) for y in subtypes(x)]))
end
3 changes: 3 additions & 0 deletions base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ export
trailing_zeros,
trigamma,
trunc,
unsafe_trunc,
typemax,
typemin,
uint,
Expand Down Expand Up @@ -941,7 +942,9 @@ export
cor,
cov,
hist,
hist!,
hist2d,
hist2d!,
histrange,
mean!,
mean,
Expand Down
1 change: 1 addition & 0 deletions base/linalg/blas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export
# Level 1
asum,
axpy!,
blascopy!,
dot,
dotc,
dotu,
Expand Down
2 changes: 0 additions & 2 deletions base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ end
subtypes(m::Module, x::DataType) = sort(collect(_subtypes(m, x)), by=string)
subtypes(x::DataType) = subtypes(Main, x)

subtypetree(x::DataType, level=-1) = (level == 0 ? (x, []) : (x, Any[subtypetree(y, level-1) for y in subtypes(x)]))

# function reflection
isgeneric(f::ANY) = (isa(f,Function) && isa(f.env,MethodTable))

Expand Down
4 changes: 0 additions & 4 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,6 @@ Types

Return a list of immediate subtypes of DataType T. Note that all currently loaded subtypes are included, including those not visible in the current module.

.. function:: subtypetree(T::DataType)

Return a nested list of all subtypes of DataType T. Note that all currently loaded subtypes are included, including those not visible in the current module.

.. function:: typemin(type)

The lowest value representable by the given (real) numeric type.
Expand Down

0 comments on commit afed989

Please sign in to comment.