Skip to content

Commit f19d608

Browse files
committed
Added a few missing methods from ReactS.Fix
1 parent b20d581 commit f19d608

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

scalaz-7.0/src/main/scala/japgolly/scalajs/react/ScalazReact.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,16 @@ object ScalazReact {
140140
@inline def zoomU [A] (r: ReactS[Unit, A]) : ReactS[S,A] = ReactS.zoomU(r)
141141

142142
@inline def applyM [M[+_],A](f: S => M[(S, A)]) (implicit M: Functor[M]) : ReactST[M,S,A] = ReactS.applyM(f)
143+
@inline def applyT [M[+_],A](f: S => (S, A)) (implicit M: Applicative[M]): ReactST[M,S,A] = ReactS.applyT(f)
143144
@inline def callbackM[M[+_],A](a: M[A], c: OpCallbackIO)(implicit M: Functor[M]) : ReactST[M,S,A] = ReactS.callbackM(a, c)
144145
@inline def callbackT[M[+_],A](a: A, c: OpCallbackIO) (implicit M: Applicative[M]): ReactST[M,S,A] = ReactS.callbackT(a, c)
145146
@inline def getT [M[+_]] (implicit M: Applicative[M]): ReactST[M,S,S] = ReactS.getT
146-
@inline def getsM [M[+_],A](f: S => M[A]) (implicit M: Applicative[M]): ReactST[M,S,A] = ReactS.getsM(f)
147+
@inline def getsM [M[+_],A](f: S => M[A]) (implicit M: Functor[M]) : ReactST[M,S,A] = ReactS.getsM(f)
148+
@inline def getsT [M[+_],A](f: S => A) (implicit M: Applicative[M]): ReactST[M,S,A] = ReactS.getsT(f)
147149
@inline def liftR [M[+_],A](f: S => ReactST[M, S, A])(implicit M: Monad[M]) : ReactST[M,S,A] = ReactS.liftR(f)
148150
@inline def liftS [M[+_],A](t: StateT[M, S, A]) (implicit M: Functor[M]) : ReactST[M,S,A] = ReactS.liftS(t)
149151
@inline def modM [M[+_]] (f: S => M[S]) (implicit M: Functor[M]) : ReactST[M,S,Unit] = ReactS.modM(f)
152+
@inline def modT [M[+_]] (f: S => S) (implicit M: Applicative[M]): ReactST[M,S,Unit] = ReactS.modT(f)
150153
@inline def retM [M[+_],A](ma: M[A]) (implicit M: Functor[M]) : ReactST[M,S,A] = ReactS.retM(ma)
151154
@inline def retT [M[+_],A](a: A) (implicit M: Applicative[M]): ReactST[M,S,A] = ReactS.retT(a)
152155
@inline def setM [M[+_]] (ms: M[S]) (implicit M: Functor[M]) : ReactST[M,S,Unit] = ReactS.setM(ms)

scalaz-7.1/src/main/scala/japgolly/scalajs/react/ScalazReact.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,16 @@ object ScalazReact {
139139
@inline def zoomU [A] (r: ReactS[Unit, A]) : ReactS[S,A] = ReactS.zoomU(r)
140140

141141
@inline def applyM [M[_],A](f: S => M[(S, A)]) (implicit M: Functor[M]) : ReactST[M,S,A] = ReactS.applyM(f)
142+
@inline def applyT [M[_],A](f: S => (S, A)) (implicit M: Applicative[M]): ReactST[M,S,A] = ReactS.applyT(f)
142143
@inline def callbackM[M[_],A](a: M[A], c: OpCallbackIO)(implicit M: Functor[M]) : ReactST[M,S,A] = ReactS.callbackM(a, c)
143144
@inline def callbackT[M[_],A](a: A, c: OpCallbackIO) (implicit M: Applicative[M]): ReactST[M,S,A] = ReactS.callbackT(a, c)
144145
@inline def getT [M[_]] (implicit M: Applicative[M]): ReactST[M,S,S] = ReactS.getT
145-
@inline def getsM [M[_],A](f: S => M[A]) (implicit M: Applicative[M]): ReactST[M,S,A] = ReactS.getsM(f)
146+
@inline def getsM [M[_],A](f: S => M[A]) (implicit M: Functor[M]) : ReactST[M,S,A] = ReactS.getsM(f)
147+
@inline def getsT [M[_],A](f: S => A) (implicit M: Applicative[M]): ReactST[M,S,A] = ReactS.getsT(f)
146148
@inline def liftR [M[_],A](f: S => ReactST[M, S, A])(implicit M: Monad[M]) : ReactST[M,S,A] = ReactS.liftR(f)
147149
@inline def liftS [M[_],A](t: StateT[M, S, A]) (implicit M: Functor[M]) : ReactST[M,S,A] = ReactS.liftS(t)
148150
@inline def modM [M[_]] (f: S => M[S]) (implicit M: Functor[M]) : ReactST[M,S,Unit] = ReactS.modM(f)
151+
@inline def modT [M[_]] (f: S => S) (implicit M: Applicative[M]): ReactST[M,S,Unit] = ReactS.modT(f)
149152
@inline def retM [M[_],A](ma: M[A]) (implicit M: Functor[M]) : ReactST[M,S,A] = ReactS.retM(ma)
150153
@inline def retT [M[_],A](a: A) (implicit M: Applicative[M]): ReactST[M,S,A] = ReactS.retT(a)
151154
@inline def setM [M[_]] (ms: M[S]) (implicit M: Functor[M]) : ReactST[M,S,Unit] = ReactS.setM(ms)

0 commit comments

Comments
 (0)