Skip to content

Commit

Permalink
Merge pull request #9 from yuyichao/0.6
Browse files Browse the repository at this point in the history
Fix 0.6 abstract type declaration depwarn
  • Loading branch information
Keno authored Feb 14, 2017
2 parents 7f9c22b + 3fe8c79 commit 74695d4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
julia 0.5
Compat 0.9.5
Compat 0.17.0
4 changes: 2 additions & 2 deletions src/AbstractTrees.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Base: getindex, setindex!, start, next, done, nextind, print, show,
using Base: SizeUnknown
using Compat

abstract AbstractShadowTree
@compat abstract type AbstractShadowTree end

include("traits.jl")
include("implicitstacks.jl")
Expand Down Expand Up @@ -267,7 +267,7 @@ eltype{I}(::Type{IndEnumerate{I}}) = Tuple{Any, eltype(I)}

# Tree Iterators

abstract TreeIterator{T}
@compat abstract type TreeIterator{T} end

"""
Iterator to visit the leaves of a tree, e.g. for the tree
Expand Down
4 changes: 2 additions & 2 deletions src/implicitstacks.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
abstract ImplicitStack
@compat abstract type ImplicitStack end
immutable ImplicitIndexStack{S} <: ImplicitStack
stack::Vector{S}
end
Expand All @@ -18,7 +18,7 @@ Base.isempty(s::ImplicitIndexStack) = isempty(s.stack)
getnode(tree, ns::ImplicitIndexStack) = isempty(ns.stack) ? tree[rootstate(tree)] :
(@assert isa(treekind(tree), IndexedTree); tree[ns.stack[end]])
function getnode(tree, stack::ImplicitNodeStack)
isempty(stack.node_stack) ?
isempty(stack.node_stack) ?
(isempty(stack.idx_stack) ? tree : children(tree)[stack.idx_stack.stack[end]]) :
children(stack.node_stack[end])[stack.idx_stack.stack[end]]
end
Expand Down
8 changes: 4 additions & 4 deletions src/traits.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
abstract ParentLinks
@compat abstract type ParentLinks end

"""
Indicates that this tree stores parent links explicitly. The implementation
Expand All @@ -11,7 +11,7 @@ immutable ImplicitParents <: ParentLinks; end
parentlinks(::Type) = ImplicitParents()
parentlinks(tree) = parentlinks(typeof(tree))

abstract SiblingLinks
@compat abstract type SiblingLinks end

"""
Indicates that this tree stores sibling links explicitly, or can compute them
Expand All @@ -27,7 +27,7 @@ siblinglinks(::Type) = ImplicitSiblings()
siblinglinks(tree) = parentlinks(typeof(tree))


abstract TreeKind
@compat abstract type TreeKind end
immutable RegularTree <: TreeKind; end
immutable IndexedTree <: TreeKind; end

Expand All @@ -38,7 +38,7 @@ children(tree, node, ::IndexedTree) = (tree[y] for y in childindices(tree, node)
children(tree, node) = children(tree, node, treekind(tree))

function rootstate()
end
end

childindices(tree, node) =
tree == node ? childindices(tree, rootstate(tree)) :
Expand Down

0 comments on commit 74695d4

Please sign in to comment.