Skip to content

Commit

Permalink
Add generic dispatch for ideal_type
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Dec 5, 2024
1 parent 7a473f4 commit 6b0ecb0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Ideal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ end
iszero(I::Ideal) = all(iszero, gens(I))

base_ring_type(::Type{<:IdealSet{T}}) where T <: RingElement = parent_type(T)

# fundamental interface, to be documented
ideal_type(x) = ideal_type(typeof(x))
ideal_type(T::DataType) = throw(MethodError(ideal_type, (T,)))

0 comments on commit 6b0ecb0

Please sign in to comment.