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
package direct | |
import java.util.UUID | |
import scala.language.experimental.saferExceptions | |
import Contains.given | |
import izumi.reflect.macrortti.LightTypeTag | |
import izumi.reflect.{*, given} | |
import sttp.tapir.* |
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
package zats | |
import cats.effect.{IO, IOApp} | |
import cats.effect.std.Console | |
import cats.{Applicative, Functor, MonadError} | |
import cats.syntax.functor.* | |
import cats.syntax.flatMap.* | |
import scala.annotation.implicitNotFound | |
type App[F[_]] = MonadError[F, Throwable] |
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 ZIO[-R, +E, +A] { | |
} | |
object ZIO { | |
def serviceWithZIO[S]: SWZIOP[S] = new SWZIOP[S] | |
def serviceWith[S]: SWP[S] = new SWP[S] | |
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
digraph { | |
editAgreement [shape=box]; | |
addCoInsureeToAgreement [fillcolor=aquamarine, style=filled]; | |
updateRelatedUser [fillcolor=aquamarine, style=filled]; | |
addAgreementCoInsuree [fillcolor=aquamarine, style=filled]; | |
updateAgreementCoInsuree [fillcolor=aquamarine, style=filled]; |
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 zio.prelude.Newtype | |
import cats.Contravariant | |
import cats.Functor | |
import cats.syntax.contravariant.* | |
import cats.syntax.functor.* | |
import io.circe.* | |
import io.circe.syntax.* | |
import io.circe.parser.decode |
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
const Direction = packed enum (u1) { | |
Output = 0, | |
Input = 1, | |
}; | |
const Level = packed enum(u1) { | |
Low = 0, | |
High = 1, | |
}; |
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
module Main | |
import Data.String | |
data CorrectSize : Nat -> Nat -> Nat -> Type where | |
SmallerThan150 : (x : Nat) -> (y : Nat) -> (z : Nat) -> {auto prf : x + y + z <= 150 = True} -> CorrectSize x y z | |
Show (CorrectSize x y z) where | |
show (SmallerThan150 x y z) = "CorrectSize " ++ show (x, y, z) | |
showPrec _ size = show size |
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
Module Datatypes. | |
Inductive bool : Type := true | false. | |
(* Scala: | |
sealed trait Bool | |
case class True() extends Bool | |
case class False() extends Bool | |
*) |
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
#ifndef _E_TEST_H_ | |
#define _E_TEST_H_ | |
#include <stdint.h> | |
#include <stdio.h> | |
#define TEST(suite, name) \ | |
if (_etest_is_test_included_in_run(#suite, #name, test_context)) { \ | |
_etest_register_running_test(#suite, #name, test_context); \ | |
} \ |
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 Coercible[A, B] { | |
def coerce(a: A): B | |
} | |
def coerce[A, B](a: A)(implicit coerceAB: Coercible[A, B]): B = { | |
coerceAB.coerce(a) | |
} | |
trait Newtype[+T] { | |
val value: T |
NewerOlder