Skip to content

Commit

Permalink
replace to placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Apr 30, 2023
1 parent 2e1efa1 commit bd3c8e5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions macros/src/main/scala/org/atnos/eff/macros/EffMacros.scala
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class EffMacros(val c: blackbox.Context) {
}

def nonStackParams(paramss: List[List[ValDef]]) = {
paramss.map { params =>
params.filter {
paramss.map {
_.filter {
case ValDef(_, _, AppliedTypeTree(Ident(name), _), _) => name != typeAlias.name
case _ => true
}
Expand Down
4 changes: 2 additions & 2 deletions shared/src/main/scala/org/atnos/eff/Eff.scala
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ trait EffImplicits {
case Right(b) => Pure(b)
}
case Impure(u, c, l) =>
Impure(u, Continuation.lift((x: u.X) => c(x).flatMap(a1 => a1.fold(a11 => tailRecM(a11)(f), b => pure(b)))), l)
Impure(u, Continuation.lift((x: u.X) => c(x).flatMap(_.fold(a11 => tailRecM(a11)(f), b => pure(b)))), l)

case ImpureAp(u, c, l) =>
ImpureAp(u, Continuation.lift(x => c(x).flatMap(a1 => a1.fold(a11 => tailRecM(a11)(f), b => pure(b)))), l)
ImpureAp(u, Continuation.lift(x => c(x).flatMap(_.fold(a11 => tailRecM(a11)(f), b => pure(b)))), l)
}
}

Expand Down
2 changes: 1 addition & 1 deletion shared/src/main/scala/org/atnos/eff/ErrorEffect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ trait ErrorInterpretation[F] extends ErrorCreation[F] { outer =>
r,
new ~>[Evaluate[F1, *], Evaluate[F2, *]] {
def apply[X](r: Evaluate[F1, X]): Evaluate[F2, X] =
Evaluate(r.run.leftMap(e => e.map(getter)))
Evaluate(r.run.leftMap(_.map(getter)))
}
)

Expand Down
2 changes: 1 addition & 1 deletion shared/src/main/scala/org/atnos/eff/Last.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ case class Last[R](value: Option[Eval[Eff[R, Unit]]]) {

/** interpret this last action as a set of effects in another stack */
def interpret[U](n: Eff[R, Unit] => Eff[U, Unit]): Last[U] =
Last[U](value.map(v => v.map(n)))
Last[U](value.map(_.map(n)))

def interpretEff[U](n: Last[R] => Eff[U, Unit]): Last[U] =
Last.eff(n(this))
Expand Down

0 comments on commit bd3c8e5

Please sign in to comment.