There is something that happens through [and it is either a guess or a
partially coherent reflection that implicates] the ways that Nemo
establishes shallow abstract hierarchies and short sequences of abstract
subordination and how they work to clarify both the heavy
interconnectedness of some concrete value types and to subsume or enfold
the occasional interwinding dependence of some of those with other concrete
computational types that is causing these islands of oddity to percolate.
In addition to today's stuff, ihe difficulty I had had with show() feels
part of the same unexpected and unwanted subcontextualization with Nemo: it
seemed that Julia was choosing not to attend nor to recognize more recent
overloading of show that occured within a module (but would work correctly
when all done without using a new module and putting everything directly
to the REPL) until I followed your advice and re-exported show wherever I
had imported it. I have not needed to think that way with other numeric
type admixtures. -- Jeffrey
On Tuesday, March 22, 2016 at 7:14:06 PM UTC-4, Bill Hart wrote:
>
> So here is an example of how broken this is. I have the following code:
>
> println(par_type, " ", T2, " ", Base.promote_rule(par_type, T2), "
> ", Base.promote_rule(par_type, T2) != par_type)
> if Base.promote_rule(par_type, T2) != par_type
> eval(:(Base.promote_rule(::Type{$par_type}, ::Type{$T2}) =
> $par_type))
> end
>
>
> So it's supposed to check if the promote_rule already returns its first
> argument and omit defining the promote_rule if it does.
>
> Here is what it prints:
>
> Nemo.Poly{Nemo.fmpz_poly} Nemo.fmpz Union{} true
> WARNING: Method definition promote_rule(Type{Nemo.Poly{Nemo.fmpz_poly}},
> Type{Nemo.fmpz}) in module Nemo at
> /home/wbhart/.julia/v0.5/Nemo/src/generic/Poly.jl:1754 overwritten at
> /home/wbhart/.julia/v0.5/Nemo/src/generic/Poly.jl:1754.
>
> In other words, it tells me that the promote_rule does not exist, so goes
> ahead and creates it, and then tells me that it already exists.
>
> This is clearly totally broken. I strongly suspect this is a bug related
> to the equality problem I outlined in the first post.
>
> Bill.
>
>