Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ring interface example is not working #1742

Closed
SoongNoonien opened this issue Jul 5, 2024 · 2 comments · Fixed by #1747
Closed

Ring interface example is not working #1742

SoongNoonien opened this issue Jul 5, 2024 · 2 comments · Fixed by #1747

Comments

@SoongNoonien
Copy link
Contributor

Hi!
While implementing a custom ring interface I had minor problems getting it to work. Specifically there was a method for base_ring_type missing. But then I noticed that this also effects the minimal example from the wiki. This is the error I get when using the minimal example:

julia> ConstantPolynomialRing(ZZ)
Constant polynomials over Error showing value of type ConstPolyRing{BigInt}:
ERROR: MethodError: no method matching base_ring_type(::ConstPolyRing{BigInt})

Closest candidates are:
  base_ring_type(::Type{ConstPoly{T}}) where T<:RingElement
   @ Main REPL[12]:1

Stacktrace:
 [1] base_ring(R::ConstPolyRing{BigInt})
   @ Main ./REPL[13]:1
 [2] show(io::IOContext{Base.TTY}, R::ConstPolyRing{BigInt})
   @ Main ./REPL[26]:3
 [3] show(io::IOContext{Base.TTY}, ::MIME{Symbol("text/plain")}, x::ConstPolyRing{BigInt})
   @ Base.Multimedia ./multimedia.jl:47

@fingolfin
Copy link
Member

Yes ring types now must implement base_ring_type. The example in the manual you link to (BTW that's not a Wiki!) needs to be updated accordingly.

@SoongNoonien
Copy link
Contributor Author

BTW that's not a Wiki!

Of course, sorry, I miss typed...

@SoongNoonien SoongNoonien changed the title Ringinterface example is not working Ring interface example is not working Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants