Skip to content

Commit 9a6a817

Browse files
authored
Move StaticArrays to an extension (#72)
1 parent 3dff0eb commit 9a6a817

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

Project.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1414
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
1515
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1616

17+
[weakdeps]
18+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
19+
20+
[extensions]
21+
ApproxFunSingularitiesStaticArraysExt = "StaticArrays"
22+
1723
[compat]
1824
ApproxFunBase = "0.8.36"
1925
ApproxFunBaseTest = "0.1"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module ApproxFunSingularitiesStaticArraysExt
2+
3+
using ApproxFunSingularities
4+
using ApproxFunBase
5+
import ApproxFunBase: coefficients
6+
using DomainSets
7+
using StaticArrays
8+
9+
function coefficients(f::AbstractVector,
10+
sp::JacobiWeight{<:Any,<:Segment{<:SVector{2}}},
11+
S2::TensorSpace{<:Any,<:Any,<:EuclideanDomain{2}})
12+
13+
coefficients(f,sp,JacobiWeight(0,0,S2))
14+
end
15+
16+
end

src/ApproxFunSingularities.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ import Base: convert, getindex, *, /, ^,
3838
show, sum, cumsum, complex, sqrt, abs, in, first, last,
3939
union, isapprox, zeros, one, length, ones, exp, log
4040

41-
using StaticArrays: SVector
42-
4341
using HalfIntegers
4442
using OddEvenIntegers
4543

@@ -330,4 +328,8 @@ function integrate(f::Fun{<:LaguerreWeight{<:Laguerre}})
330328
end
331329
end
332330

331+
if !isdefined(Base, :get_extension)
332+
include("../ext/ApproxFunSingularitiesStaticArraysExt.jl")
333+
end
334+
333335
end

src/JacobiWeight.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ function coefficients(f::AbstractVector,
110110
sp::JacobiWeight{<:Any,DD},S2::SumSpace{<:Any,DD,<:Real}) where {DD<:IntervalOrSegment}
111111
sumspacecoefficients(f,sp,S2)
112112
end
113-
function coefficients(f::AbstractVector,
114-
sp::JacobiWeight{<:Any,<:Segment{<:SVector{2}}}, S2::TensorSpace{<:Any,<:Any,<:EuclideanDomain{2}})
115-
coefficients(f,sp,JacobiWeight(0,0,S2))
116-
end
117113

118114
coefficients(f::AbstractVector,sp::JacobiWeight{<:Any,DD},S2::Space{DD,<:Real}) where {DD<:IntervalOrSegment} =
119115
coefficients(f,sp,JacobiWeight(0,0,S2))

0 commit comments

Comments
 (0)