Skip to content

Commit 6483f2d

Browse files
committed
drop affinepars macro
1 parent 51f1ca6 commit 6483f2d

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/macros.jl

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ using MLStyle
33
using Random: AbstractRNG
44
using KeywordCalls
55
using ConstructionBase
6-
export @parameterized, @half, @affinepars
6+
export @parameterized, @half
77

88
# A fold over ASTs. Example usage in `replace`
99
function foldast(leaf, branch; kwargs...)
@@ -130,21 +130,6 @@ macro parameterized(expr)
130130
_parameterized(__module__, expr)
131131
end
132132

133-
macro affinepars(expr)
134-
_affinepars(__module__, expr)
135-
end
136-
137-
function _affinepars(__module__, ex)
138-
ex = esc(ex)
139-
quote
140-
function Base.show(io::IO, d::Affine{N, <:$ex}) where N
141-
nt1 = getfield(d.parent, :par)
142-
nt2 = getfield(getfield(d, :f), :par)
143-
par = merge(nt1, nt2)
144-
print(io, $ex, par)
145-
end
146-
end
147-
end
148133

149134
"""
150135
@half dist([paramnames])

0 commit comments

Comments
 (0)