mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-24 18:05:27 +01:00
fix conversion GSymbol → GWord
This commit is contained in:
parent
6b87bf44a3
commit
885854896f
@ -1,6 +1,6 @@
|
||||
module Groups
|
||||
|
||||
import Base: length, ==, hash, show
|
||||
import Base: length, ==, hash, show, convert
|
||||
import Base: one, inv, reduce, *, ^
|
||||
|
||||
export GSymbol, GWord
|
||||
@ -42,6 +42,7 @@ type GWord{T<:GSymbol} <: Word
|
||||
end
|
||||
|
||||
GWord{T<:GSymbol}(s::T) = GWord{T}([s])
|
||||
convert{T<:GSymbol, W<:Word}(::Type{W}, s::T) = GWord{T}(s)
|
||||
|
||||
IDWord{T<:GSymbol}(::Type{T}) = GWord(one(T))
|
||||
IDWord{T<:GSymbol}(W::GWord{T}) = IDWord(T)
|
||||
|
Loading…
Reference in New Issue
Block a user