Skip to content

Commit 709c64d

Browse files
ReubenJdekelzeldov
andauthored
Remove default == implementation for AbstractHoles (#61)
* Remove default `==` implementation for `AbstractHole`s Implementers of new hole types should decide whether to follow the logic of a `Hole`, which has no children, or a `UniformHole,` which does. * define == for Hole --------- Co-authored-by: Dekel <dekelzeldov@gmail.com>
1 parent b11f526 commit 709c64d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/rulenode.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,10 @@ function Base.:(==)(a::UniformHole, b::UniformHole)
340340
return a.domain == b.domain && length(a.children) == length(b.children) &&
341341
all(isequal(a, b) for (a, b) in zip(a.children, b.children))
342342
end
343-
function Base.:(==)(a::H, b::H) where {H <: AbstractHole}
343+
function Base.:(==)(a::Hole, b::Hole)
344344
return a.domain == b.domain
345345
end
346346

347-
348347
Base.copy(r::RuleNode) = RuleNode(r.ind, r._val, r.children)
349348
Base.copy(h::Hole) = Hole(copy(h.domain))
350349
Base.copy(h::UniformHole) = UniformHole(copy(h.domain), h.children)

0 commit comments

Comments
 (0)