diff --git a/src/types.jl b/src/types.jl index a7464ee..7a23eee 100644 --- a/src/types.jl +++ b/src/types.jl @@ -71,6 +71,9 @@ mutable struct FPGroupElement{Gr<:AbstractFPGroup,W<:AbstractWord} <: AbstractFP new{Gr, W}(word, UInt(0), G) end +Base.show(io::IO, ::Type{<:FPGroupElement{Gr}}) where {Gr} = + print(io, FPGroupElement, "{$Gr, …}") + word(f::AbstractFPGroupElement) = f.word #convenience @@ -203,6 +206,9 @@ function Base.show(io::IO, G::FPGroup) print(io, "⟩") end +Base.show(io::IO, ::Type{<:FPGroup{T}}) where {T} = + print(io, FPGroup, "{$T, …}") + ## GSymbol aka letter of alphabet abstract type GSymbol end