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