list = map(
filter(names(Hecke; all=true)) do name
isdefined(Hecke, name) || return false # remove all wrong exports (see #1964)
T = getfield(Hecke, name)
T isa DataType || T isa UnionAll || return false # remove all non-types and non-parametric-types
parentmodule(==, (T, T)) == Base && return false # remove everything without custom ==
loc = functionloc(==, (T, T))
endswith(loc[1], "julia/base/Base.jl") && loc[2] == 165 && return false # remove everything without custom ==
parentmodule(hash, (T, UInt)) == Base # keep iff there is no custom hash
end,
) do name
T = getfield(Hecke, name)
loc = functionloc(==, (T, T))
if occursin("Hecke.jl/", loc[1])
loc_cleaned = loc[1][first(findlast("Hecke.jl/", loc[1])):end]
elseif occursin("packages/", loc[1])
loc_cleaned = loc[1][(first(findlast("packages/", loc[1])) + length("packages/")):end]
elseif occursin("julia/base/", loc[1])
loc_cleaned = loc[1][first(findlast("julia/base/", loc[1])):end]
else
loc_cleaned = loc[1]
end
name, parentmodule(T), (loc_cleaned, loc[2])
end
Before I forget. Here are the types with missing
hash
methods (or for which==
should be removed). (Courtesy of @lgoettgens (https://github.com/oscar-system/Oscar.jl/issues/2222). Needs julia version 1.10.5:This yields