This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[cfg(feature = "ssr")] | |
pub async fn fetch(search_term: &str) -> Vec<String> { | |
todo!(); | |
} | |
#[derive(PartialEq, Properties, Clone)] | |
pub struct InputProps { | |
pub on_search: Callback<String>, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_export] | |
macro_rules! enum_variants_as_structs { | |
( | |
$(#[$meta_enum:meta])* | |
enum $Name:ident { | |
// haven't found a way to propagate enum meta's to variants because | |
// "meta-variable x repeats N times, but y repeats M times" | |
$($(#[$meta_variant:meta])* $Variant:ident { $($f:ident: $ty:ty),* }),* $(,)? | |
} | |
) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait KV[F[_], A] { | |
def lookup(k: K): EitherT[F, E, V[A]] | |
} | |
object KV { | |
def impl[F[_]: Monad, A: Parseable]: KV[F, A] = ??? | |
def cached[F[_]: Monad, A: Parseable](implicit C: Cache[F, K , V[A]]): KV[F, A] = ??? | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/github4s/src/test/scala/github4s/integration/ReposSpec.scala b/github4s/src/test/scala/github4s/integration/ReposSpec.scala | |
index beeb7be..297990d 100644 | |
--- a/github4s/src/test/scala/github4s/integration/ReposSpec.scala | |
+++ b/github4s/src/test/scala/github4s/integration/ReposSpec.scala | |
@@ -16,8 +16,10 @@ | |
package github4s.integration | |
+import cats.data.EitherT | |
import cats.effect.IO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run() { | |
local repo=$1 | |
local branch_name="update/scalafmt-core-${new_version}" | |
git clone https://github.com/$owner/$repo.git | |
cd $repo | |
git checkout -b $branch_name | |
sed -i "s/${old_version}/${new_version}/g" .scalafmt.conf | |
sed -i 's/scalafmtCheck;/scalafmtCheckAll;/g' build.sbt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cats.effect.{IO, Sync} | |
import fs2.Stream | |
import io.circe.{Decoder, Encoder, Json} | |
import io.circe.generic.semiauto._ | |
import io.circe.syntax._ | |
import org.http4s.{EntityDecoder, EntityEncoder, Response, Status} | |
import org.http4s.circe._ | |
sealed trait A | |
final case class B(error: String) extends A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Algebra[F[_]] { | |
def find(request: Req): F[List[Res]] | |
} | |
// this is the real interpreter, it uses https://github.com/tpolecat/doobie but that's an implementation detail | |
class Interpreter[F[_]: Monad](val xa: Transactor[F]) | |
extends Algebra[F] { | |
import SQL._ | |
def find(request: Req): F[List[Res]] = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsettings set org.gnome.Terminal.Legacy.Settings headerbar false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def splitIssues( | |
n: NonEmptyList[EnrichmentStageIssue] | |
): (List[EnrichmentFailure], List[SchemaViolation]) = | |
n.foldLeft((List.empty[EnrichmentFailure], List.empty[SchemaViolation])) { case ((es, ss), i) => | |
i match { | |
case e: EnrichmentFailure => (e :: es, ss) | |
case s: SchemaViolation => (es, s :: ss) | |
} | |
} |
NewerOlder