@@ -81,22 +81,22 @@ object semiGroups {
81
81
type Impl [T ] = Extension [T , Monoid ] with MonoidCommon
82
82
}
83
83
84
- implicit object IntOps extends Extension [Int , Monoid ] with MonoidCommon { self =>
84
+ implicit object IntOps extends Extension [Int , Monoid ] with MonoidCommon {
85
85
type This = Int
86
86
type Instance = Monoid
87
87
def unit : Int = 0
88
88
def inject ($this : Int ) = new Monoid {
89
- val common : self. type = self
89
+ val common : IntOps . this . type = IntOps . this
90
90
def add (that : This ): This = $this + that
91
91
}
92
92
}
93
93
94
- implicit object StringOps extends Extension [String , Monoid ] with MonoidCommon { self =>
94
+ implicit object StringOps extends Extension [String , Monoid ] with MonoidCommon {
95
95
type This = String
96
96
type Instance = Monoid
97
97
def unit = " "
98
98
def inject ($this : String ) = new Monoid {
99
- val common : self. type = self
99
+ val common : StringOps . this . type = StringOps . this
100
100
def add (that : This ): This = $this .concat(that)
101
101
}
102
102
}
@@ -159,12 +159,12 @@ object ord {
159
159
type Impl [T ] = Extension [T , Ord ] with OrdCommon
160
160
}
161
161
162
- implicit object IntOrd extends Extension [Int , Ord ] with OrdCommon { self =>
162
+ implicit object IntOrd extends Extension [Int , Ord ] with OrdCommon {
163
163
type This = Int
164
164
type Instance = Ord
165
165
val minimum : Int = Int .MinValue
166
166
def inject ($this : Int ) = new Ord {
167
- val common : self. type = self
167
+ val common : IntOrd . this . type = IntOrd . this
168
168
def compareTo (that : This ): Int =
169
169
if (this < that) - 1 else if (this > that) + 1 else 0
170
170
}
@@ -293,12 +293,12 @@ object functors {
293
293
if (n == 0 ) Functor .impl[F ].pure(x)
294
294
else develop(n - 1 , x, f).map(f)
295
295
296
- implicit object ListMonad extends Extension1 [List , Monad ] with MonadCommon { self =>
296
+ implicit object ListMonad extends Extension1 [List , Monad ] with MonadCommon {
297
297
type This [A ] = List [A ]
298
298
type Instance = Monad
299
299
def pure [A ](x : A ) = x :: Nil
300
300
def inject [A ]($this : List [A ]) = new Monad [A ] {
301
- val common : self. type = self
301
+ val common : ListMonad . this . type = ListMonad
302
302
def flatMap [B ](f : A => List [B ]): List [B ] = $this .flatMap(f)
303
303
}
304
304
}
0 commit comments