@@ -7,7 +7,7 @@ subtypes, as we know the full set that might be encountered.
77Thus we can avoid any ambiguities.
88
99Notice:
10- The precidence goes: (:Wirtinger, :Zero, :DNE , :One, :AbstractThunk, :Any)
10+ The precidence goes: (:Wirtinger, :Zero, :DoesNotExist , :One, :AbstractThunk, :Any)
1111 Thus each of the @eval loops creating definitions of + and *
1212 defines the combination this type with all types of lower precidence.
1313 This means each eval loops is 1 item smaller than the previous.
@@ -36,7 +36,7 @@ function Base.:+(a::Wirtinger, b::Wirtinger)
3636 return Wirtinger (+ (a. primal, b. primal), a. conjugate + b. conjugate)
3737end
3838
39- for T in (:Zero , :DNE , :One , :AbstractThunk , :Any )
39+ for T in (:Zero , :DoesNotExist , :One , :AbstractThunk , :Any )
4040 @eval Base.:+ (a:: Wirtinger , b:: $T ) = a + Wirtinger (b, Zero ())
4141 @eval Base.:+ (a:: $T , b:: Wirtinger ) = Wirtinger (a, Zero ()) + b
4242
4747
4848Base.:+ (:: Zero , b:: Zero ) = Zero ()
4949Base.:* (:: Zero , :: Zero ) = Zero ()
50- for T in (:DNE , :One , :AbstractThunk , :Any )
50+ for T in (:DoesNotExist , :One , :AbstractThunk , :Any )
5151 @eval Base.:+ (:: Zero , b:: $T ) = b
5252 @eval Base.:+ (a:: $T , :: Zero ) = a
5353
@@ -56,14 +56,14 @@ for T in (:DNE, :One, :AbstractThunk, :Any)
5656end
5757
5858
59- Base.:+ (:: DNE , :: DNE ) = DNE ()
60- Base.:* (:: DNE , :: DNE ) = DNE ()
59+ Base.:+ (:: DoesNotExist , :: DoesNotExist ) = DoesNotExist ()
60+ Base.:* (:: DoesNotExist , :: DoesNotExist ) = DoesNotExist ()
6161for T in (:One , :AbstractThunk , :Any )
62- @eval Base.:+ (:: DNE , b:: $T ) = b
63- @eval Base.:+ (a:: $T , :: DNE ) = a
62+ @eval Base.:+ (:: DoesNotExist , b:: $T ) = b
63+ @eval Base.:+ (a:: $T , :: DoesNotExist ) = a
6464
65- @eval Base.:* (:: DNE , :: $T ) = DNE ()
66- @eval Base.:* (:: $T , :: DNE ) = DNE ()
65+ @eval Base.:* (:: DoesNotExist , :: $T ) = DoesNotExist ()
66+ @eval Base.:* (:: $T , :: DoesNotExist ) = DoesNotExist ()
6767end
6868
6969
0 commit comments