Skip to content

Move around some stuff in core._ - #2313

Open
michalrus wants to merge 2 commits into
masterfrom
devexp/when-pure
Open

Move around some stuff in core._#2313
michalrus wants to merge 2 commits into
masterfrom
devexp/when-pure

Conversation

@michalrus

Copy link
Copy Markdown
Contributor

(A couple of FIXMEs as a nice break from bugs :P)

(A couple of FIXMEs as a nice break from bugs :P)

def doOrMeh(condition: Boolean, action: ⇒ DbResultT[_])(implicit ec: EC): DbResultT[Unit] =
if (condition) action.meh else DbResultT.unit
def when[F[_]](p: Boolean, s: ⇒ F[Unit])(implicit F: Applicative[F]): F[Unit] =

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def appendForUpdate[A, B <: slick.dbio.NoStream](sql: SqlAction[A, B, Effect.Read]): DBIO[A] =
sql.overrideStatements(sql.statements.map(_ + " for update"))

def lift[A](value: A): DBIO[A] = DBIO.successful(value)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed, we have pure from cats.

def apply[A](a: A)(implicit F: Monad[F]): FoxyT[F, A] = // TODO: remove me? @michalrus
pure(a)

def pure[A](a: A)(implicit F: Monad[F]): FoxyT[F, A] =

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed, we have pure from cats.

}

trait FoxyTFunctions[F[_]] {
def apply[A](a: A)(implicit F: Monad[F]): FoxyT[F, A] = // TODO: remove me? @michalrus

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code.

@narma

Copy link
Copy Markdown
Contributor

FMT!

@michalrus

Copy link
Copy Markdown
ContributorAuthor

Yikes!
But it wouldn’t compile anyway. :p

for {
failures ← * <~ IlluminateAlgorithm.validateAttributes(fs.form.attributes, fs.shadow.attributes)
_ ← * <~ failIfFailures(failures)
_ ← * <~ failIfFailures[DBIO](failures) // TODO: why no inference? @michalrus

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kjanosz sad :(

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@michalrus@narma