Skip to content

Commit

Permalink
Format files better (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored Feb 11, 2024
1 parent 8d55515 commit c8453ba
Showing 1 changed file with 72 additions and 72 deletions.
144 changes: 72 additions & 72 deletions src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,91 +3,91 @@ using PrecompileTools

@setup_workload begin
@compile_workload begin
type = :(E{X<:Real,Y<:Real})
type = :(E{X<:Real,Y<:Real})
struct_defs = :(begin
@kwdef mutable struct F{X<:Int}
a::Tuple{X, X}
b::Tuple{Float64, Float64}
const c::Symbol
end
@kwdef mutable struct G{X}
a::Tuple{X, X}
d::Int32
e::Bool
const c::Symbol
end
@kwdef mutable struct H{X,Y<:Real}
a::Tuple{X, X}
f::Y
g::Tuple{Complex, Complex}
const c::Symbol
end
end)
@kwdef mutable struct F{X<:Int}
a::Tuple{X, X}
b::Tuple{Float64, Float64}
const c::Symbol
end
@kwdef mutable struct G{X}
a::Tuple{X, X}
d::Int32
e::Bool
const c::Symbol
end
@kwdef mutable struct H{X,Y<:Real}
a::Tuple{X, X}
f::Y
g::Tuple{Complex, Complex}
const c::Symbol
end
end)
_compact_structs(type, struct_defs)
_sum_structs(type, struct_defs)
type = :(Animal{T,N,J})
type = :(Animal{T,N,J})
struct_defs = :(begin
@kwdef mutable struct Wolf{T,N}
energy::T = 0.5
ground_speed::N
const fur_color::Symbol
end
@kwdef mutable struct Hawk{T,N,J}
energy::T = 0.1
ground_speed::N
flight_speed::J
end
end)
@kwdef mutable struct Wolf{T,N}
energy::T = 0.5
ground_speed::N
const fur_color::Symbol
end
@kwdef mutable struct Hawk{T,N,J}
energy::T = 0.1
ground_speed::N
flight_speed::J
end
end)
_compact_structs(type, struct_defs)
_sum_structs(type, struct_defs)
type = :(Simple2 <: AbstractSimple2)
type = :(Simple2 <: AbstractSimple2)
struct_defs = :(begin
struct SimpleA2
x
z::Int
end
struct SimpleB2
y
q::String
end
end)
struct SimpleA2
x
z::Int
end
struct SimpleB2
y
q::String
end
end)
_compact_structs(type, struct_defs)
_sum_structs(type, struct_defs)
type = :(TestOrder2)
type = :(TestOrder2)
struct_defs = :(begin
struct TestOrder21
x::String
y::Float64
end
struct TestOrder22
y::Float64
z::Vector{Int}
x::String
end
end)
struct TestOrder21
x::String
y::Float64
end
struct TestOrder22
y::Float64
z::Vector{Int}
x::String
end
end)
_compact_structs(type, struct_defs)
_sum_structs(type, struct_defs)
type = :(AA{T})
type = :(AA{T})
struct_defs = :(begin
@kwdef mutable struct BB{T}
id::Int
a::T = 1
b::Int
c::Symbol
end
@kwdef mutable struct CC
id::Int
b::Int = 2
c::Symbol
d::Vector{Int}
end
@kwdef mutable struct DD{T}
id::Int
c::Symbol = :k
d::Vector{Int}
a::T
end
end)
@kwdef mutable struct BB{T}
id::Int
a::T = 1
b::Int
c::Symbol
end
@kwdef mutable struct CC
id::Int
b::Int = 2
c::Symbol
d::Vector{Int}
end
@kwdef mutable struct DD{T}
id::Int
c::Symbol = :k
d::Vector{Int}
a::T
end
end)
_compact_structs(type, struct_defs)
_sum_structs(type, struct_defs)
end
Expand Down

0 comments on commit c8453ba

Please sign in to comment.