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 49dfd4c
Show file tree
Hide file tree
Showing 2 changed files with 5 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,)))

Check warning on line 47 in src/Ideal.jl

View check run for this annotation

Codecov / codecov/patch

src/Ideal.jl#L46-L47

Added lines #L46 - L47 were not covered by tests
1 change: 1 addition & 0 deletions src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ export hooklength
export howell_form
export howell_form_with_transformation
export ideal
export ideal_type
export identity_map
export identity_matrix
export image
Expand Down

0 comments on commit 49dfd4c

Please sign in to comment.