@@ -58,8 +58,8 @@ object Lens {
5858 getter.unseal match {
5959 case Function (param :: Nil , Path (o, parts)) if o.symbol == param.symbol =>
6060 ' {
61- val setter = (t : T ) => (s : S ) => ~ setterBody(('(s)) .unseal, ( ' (t)) .unseal, parts).seal[S ]
62- apply(~ getter)(setter)
61+ val setter = (t : T ) => (s : S ) => $ { setterBody((' s ) .unseal, (' t ) .unseal, parts).seal[S ] }
62+ apply($ getter)(setter)
6363 }
6464 case _ =>
6565 throw new QuoteError (" Unsupported syntax. Example: `GenLens[Address](_.streetNumber)`" )
@@ -77,7 +77,7 @@ object GenLens {
7777
7878 def apply [S ] = new MkGenLens [S ]
7979 class MkGenLens [S ] {
80- inline def apply [T ](get : => (S => T )): Lens [S , T ] = ~ Lens .impl('( get))
80+ inline def apply [T ](get : => (S => T )): Lens [S , T ] = $ { Lens .impl(' get ) }
8181 }
8282}
8383
@@ -122,9 +122,9 @@ object Iso {
122122
123123 ' {
124124 // (p: S) => p._1
125- val to = (p : S ) => ~ { Term .Select .unique(('(p) ).unseal, "_1").seal[A] }
125+ val to = (p : S ) => $ { Term .Select .unique((' p ).unseal, " _1" ).seal[A ] }
126126 // (p: A) => S(p)
127- val from = (p : A ) => ~ { Term .Select .overloaded(Term .Ident (companion), " apply" , Nil , ('(p) ).unseal :: Nil).seal[S] }
127+ val from = (p : A ) => $ { Term .Select .overloaded(Term .Ident (companion), " apply" , Nil , (' p ).unseal :: Nil ).seal[S ] }
128128 apply(from)(to)
129129 }
130130 }
@@ -139,7 +139,7 @@ object Iso {
139139 if (tpS.isSingleton) {
140140 val ident = Term .Ident (tpS.asInstanceOf [TermRef ]).seal[S ]
141141 ' {
142- Iso [S , 1 ](Function .const(~ ident))(Function .const(1 ))
142+ Iso [S , 1 ](Function .const($ ident))(Function .const(1 ))
143143 }
144144 }
145145 else if (tpS.classSymbol.flatMap(cls => if (cls.flags.is(Flags .Case )) Some (true ) else None ).nonEmpty) {
@@ -156,7 +156,7 @@ object Iso {
156156 val obj = Term .Select .overloaded(Term .Ident (companion), " apply" , Nil , Nil ).seal[S ]
157157
158158 ' {
159- Iso [S , 1 ](Function .const(~ obj))(Function .const(1 ))
159+ Iso [S , 1 ](Function .const($ obj))(Function .const(1 ))
160160 }
161161 }
162162 else {
@@ -176,12 +176,12 @@ object GenIso {
176176 * { p => p._1 }
177177 * { p => Person(p) }
178178 */
179- inline def apply [S , A ]: Iso [S , A ] = ~ Iso .impl[S , A ]
179+ inline def apply [S , A ]: Iso [S , A ] = $ { Iso .impl[S , A ] }
180180
181181 // TODO: require whitebox macro
182- inline def fields [S ]: Iso [S , Any ] = ~ Iso .implFields[S ]
182+ inline def fields [S ]: Iso [S , Any ] = $ { Iso .implFields[S ] }
183183
184- inline def unit [S ]: Iso [S , 1 ] = ~ Iso .implUnit[S ]
184+ inline def unit [S ]: Iso [S , 1 ] = $ { Iso .implUnit[S ] }
185185}
186186
187187trait Prism [S , A ] { outer =>
@@ -221,5 +221,5 @@ object GenPrism {
221221 * case _ => None
222222 * }(jstr => jstr)
223223 */
224- inline def apply [S , A <: S ]: Prism [S , A ] = ~ Prism .impl[S , A ]
224+ inline def apply [S , A <: S ]: Prism [S , A ] = $ { Prism .impl[S , A ] }
225225}
0 commit comments