diff --git a/REQUIRE b/REQUIRE index d91053d7b..ca35fd09e 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1,3 @@ julia 0.5 -Compat 0.13.0 -DataStructures 0.5.0 \ No newline at end of file +Compat 0.17.0 +DataStructures 0.5.0 diff --git a/perf/sampling.jl b/perf/sampling.jl index 3f2289cb1..393f18276 100644 --- a/perf/sampling.jl +++ b/perf/sampling.jl @@ -1,8 +1,9 @@ -# Benchmark on non-weighted sampling +# Benchmark on non-weighted sampling # require the BenchmarkLite package using BenchmarkLite using StatsBase +using Compat import StatsBase: direct_sample!, xmultinom_sample! import StatsBase: knuths_sample!, fisher_yates_sample!, self_avoid_sample! @@ -12,8 +13,8 @@ import StatsBase: seqsample_a!, seqsample_c! type SampleProc{Alg} <: Proc end -abstract WithRep -abstract NoRep +@compat abstract type WithRep end +@compat abstract type NoRep end type Direct <: WithRep end tsample!(s::Direct, a, x) = direct_sample!(a, x) diff --git a/perf/wsampling.jl b/perf/wsampling.jl index ab4543ff5..8e1f53c61 100644 --- a/perf/wsampling.jl +++ b/perf/wsampling.jl @@ -2,6 +2,7 @@ using BenchmarkLite using StatsBase +using Compat import StatsBase: direct_sample!, alias_sample!, xmultinom_sample! @@ -9,8 +10,8 @@ import StatsBase: direct_sample!, alias_sample!, xmultinom_sample! type WSampleProc{Alg} <: Proc end -abstract WithRep -abstract NoRep +@compat abstract type WithRep end +@compat abstract type NoRep end type Direct <: WithRep end tsample!(s::Direct, wv, x) = direct_sample!(1:length(wv), wv, x) diff --git a/src/hist.jl b/src/hist.jl index 159d15d5b..84be79f8c 100644 --- a/src/hist.jl +++ b/src/hist.jl @@ -93,7 +93,7 @@ function sturges(n) # Sturges' formula ceil(Integer, log2(n))+1 end -abstract AbstractHistogram{T<:Real,N,E} +@compat abstract type AbstractHistogram{T<:Real,N,E} end # N-dimensional histogram object type Histogram{T<:Real,N,E} <: AbstractHistogram{T,N,E} diff --git a/src/statmodels.jl b/src/statmodels.jl index 97b69a514..c9e37e678 100644 --- a/src/statmodels.jl +++ b/src/statmodels.jl @@ -1,6 +1,6 @@ # Statistical Models -abstract StatisticalModel +@compat abstract type StatisticalModel end coef(obj::StatisticalModel) = error("coef is not defined for $(typeof(obj)).") coeftable(obj::StatisticalModel) = error("coeftable is not defined for $(typeof(obj)).") @@ -145,7 +145,7 @@ end const adjr² = adjr2 -abstract RegressionModel <: StatisticalModel +@compat abstract type RegressionModel <: StatisticalModel end fitted(obj::RegressionModel) = error("fitted is not defined for $(typeof(obj)).") model_response(obj::RegressionModel) = error("model_response is not defined for $(typeof(obj)).")