Another possibility: introduce a special "extends" syntax to Julia, e.g.
module Hecke type SpecialMat <: Nemo.MatElem end function det(a::SpecialMat) if blah # do whatever else Nemo.det end end extends det Nemo.det # tells Julia to somehow treat the det implementation above specially so it can call the Nemo version of the function without calling itself. end # module The behaviour would be: if extends is missing, it gives an ambiguity warning about Nemo.det vs Hecke.det if someone calls det after including Hecke and Nemo. Bill.