diff --git a/ext/DiffEqBaseGTPSAExt.jl b/ext/DiffEqBaseGTPSAExt.jl index 65c383f73..10999bb26 100644 --- a/ext/DiffEqBaseGTPSAExt.jl +++ b/ext/DiffEqBaseGTPSAExt.jl @@ -1,14 +1,8 @@ module DiffEqBaseGTPSAExt -if isdefined(Base, :get_extension) - using DiffEqBase - import DiffEqBase: value, ODE_DEFAULT_NORM - using GTPSA -else - using ..DiffEqBase - import ..DiffEqBase: value, ODE_DEFAULT_NORM - using ..GTPSA -end +using DiffEqBase +import DiffEqBase: value, ODE_DEFAULT_NORM +using GTPSA value(x::TPS) = scalar(x) value(::Type{<:TPS{T}}) where {T} = T diff --git a/ext/DiffEqBaseGeneralizedGeneratedExt.jl b/ext/DiffEqBaseGeneralizedGeneratedExt.jl index 44f478625..70a11e367 100644 --- a/ext/DiffEqBaseGeneralizedGeneratedExt.jl +++ b/ext/DiffEqBaseGeneralizedGeneratedExt.jl @@ -1,12 +1,7 @@ module DiffEqBaseGeneralizedGeneratedExt -if isdefined(Base, :get_extension) - using DiffEqBase - using GeneralizedGenerated -else - using ..DiffEqBase - using ..GeneralizedGenerated -end +using DiffEqBase +using GeneralizedGenerated function SciMLBase.numargs(::GeneralizedGenerated.RuntimeFn{Args}) where {Args} GeneralizedGenerated.from_type(Args) |> length diff --git a/ext/DiffEqBaseMPIExt.jl b/ext/DiffEqBaseMPIExt.jl index a5c0b2d82..f600079bb 100644 --- a/ext/DiffEqBaseMPIExt.jl +++ b/ext/DiffEqBaseMPIExt.jl @@ -1,12 +1,7 @@ module DiffEqBaseMPIExt -if isdefined(Base, :get_extension) - using DiffEqBase - import MPI -else - using ..DiffEqBase - import ..MPI -end +using DiffEqBase +import MPI if isdefined(MPI, :AbstractMultiRequest) function DiffEqBase.anyeltypedual(::Type{T}, diff --git a/ext/DiffEqBaseMeasurementsExt.jl b/ext/DiffEqBaseMeasurementsExt.jl index 804cf0036..a72423708 100644 --- a/ext/DiffEqBaseMeasurementsExt.jl +++ b/ext/DiffEqBaseMeasurementsExt.jl @@ -1,14 +1,8 @@ module DiffEqBaseMeasurementsExt -if isdefined(Base, :get_extension) - using DiffEqBase - import DiffEqBase: value - using Measurements -else - using ..DiffEqBase - import ..DiffEqBase: value - using ..Measurements -end +using DiffEqBase +import DiffEqBase: value +using Measurements function DiffEqBase.promote_u0(u0::AbstractArray{<:Measurements.Measurement}, p::AbstractArray{<:Measurements.Measurement}, t0) diff --git a/ext/DiffEqBaseMonteCarloMeasurementsExt.jl b/ext/DiffEqBaseMonteCarloMeasurementsExt.jl index c00d479a8..d2b33d1a6 100644 --- a/ext/DiffEqBaseMonteCarloMeasurementsExt.jl +++ b/ext/DiffEqBaseMonteCarloMeasurementsExt.jl @@ -1,14 +1,8 @@ module DiffEqBaseMonteCarloMeasurementsExt -if isdefined(Base, :get_extension) - using DiffEqBase - import DiffEqBase: value - using MonteCarloMeasurements -else - using ..DiffEqBase - import ..DiffEqBase: value - using ..MonteCarloMeasurements -end +using DiffEqBase +import DiffEqBase: value +using MonteCarloMeasurements function DiffEqBase.promote_u0( u0::AbstractArray{ diff --git a/ext/DiffEqBaseTrackerExt.jl b/ext/DiffEqBaseTrackerExt.jl index 6d77714ba..34d40a2a5 100644 --- a/ext/DiffEqBaseTrackerExt.jl +++ b/ext/DiffEqBaseTrackerExt.jl @@ -1,14 +1,8 @@ module DiffEqBaseTrackerExt -if isdefined(Base, :get_extension) - using DiffEqBase - import DiffEqBase: value - import Tracker -else - using ..DiffEqBase - import ..DiffEqBase: value - import ..Tracker -end +using DiffEqBase +import DiffEqBase: value +import Tracker DiffEqBase.value(x::Type{Tracker.TrackedReal{T}}) where {T} = T DiffEqBase.value(x::Type{Tracker.TrackedArray{T, N, A}}) where {T, N, A} = Array{T, N} diff --git a/ext/DiffEqBaseUnitfulExt.jl b/ext/DiffEqBaseUnitfulExt.jl index f17c63f65..381b0e516 100644 --- a/ext/DiffEqBaseUnitfulExt.jl +++ b/ext/DiffEqBaseUnitfulExt.jl @@ -1,14 +1,9 @@ module DiffEqBaseUnitfulExt -if isdefined(Base, :get_extension) - using DiffEqBase - import DiffEqBase: value - using Unitful -else - using ..DiffEqBase - import ..DiffEqBase: value - using ..Unitful -end +using DiffEqBase +import DiffEqBase: value +using Unitful + # Support adaptive errors should be errorless for exponentiation value(x::Type{Unitful.AbstractQuantity{T, D, U}}) where {T, D, U} = T value(x::Unitful.AbstractQuantity) = x.val