This file contains hidden or 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
| //> using options -Wunused:imports | |
| import scala.compiletime.testing.{Error, typeCheckErrors} | |
| object DummySpec extends App { | |
| case class A(x: Int) | |
| val errors: List[Error] = typeCheckErrors(""" | |
| import com.example.MyTypeClass | |
| summon[MyTypeClass[A]] |
This file contains hidden or 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
| //> using platform native | |
| //> using nativeVersion 0.5.9 | |
| //> using dep org.typelevel::cats-effect::3.7.0-RC1 | |
| import cats.effect.ExitCode | |
| import cats.effect.IO | |
| import cats.effect.IOApp | |
| object App extends IOApp { |
This file contains hidden or 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
| //> using scala 3.3.5 | |
| trait StreamArnFor[A] { | |
| val name: String | |
| } | |
| object api { | |
| def expect[ | |
| CompanionObject, |
This file contains hidden or 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
| //> using scala 3.3.5 | |
| trait StreamArnFor[A] { | |
| val name: String | |
| } | |
| object api { | |
| def expect[ | |
| CompanionObject, |
This file contains hidden or 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 example | |
| private object lib { | |
| def doStuff = println("Hello from MyLib") | |
| } |
This file contains hidden or 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 scala.annotation.tailrec | |
| object SelectionSort { | |
| @tailrec | |
| def sort(arr: List[Int], acc: List[Int] = Nil): List[Int] = { | |
| if (arr.isEmpty) acc.reverse | |
| else { | |
| val min = arr.min | |
| val (left, right) = arr.span(_ != min) |
This file contains hidden or 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 os | |
| import json | |
| import argparse | |
| from typing import Dict, Any, List | |
| def convert_atproto_type_to_smithy(atproto_type: str, nested: bool = False) -> str: | |
| """ | |
| Convert ATP types to Smithy types with more robust type mapping | |
| """ | |
| type_mapping = { |
This file contains hidden or 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.Show | |
| import cats.syntax.all.* | |
| trait Encoder[A] { | |
| def encode(v: A): String | |
| } | |
| object Encoder extends EncoderDerivation { | |
| object instances { |
This file contains hidden or 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
| //> using dep "org.typelevel::cats-effect:3.5.4" | |
| //> using scala "3.3.3" | |
| import cats.Functor | |
| import cats.effect.std.UUIDGen | |
| import cats.syntax.all.* | |
| import java.util.UUID | |
| final class MyId private (val id: String) |
This file contains hidden or 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
| //> using dep "com.disneystreaming::weaver-cats:0.8.4" | |
| //> using dep "com.lihaoyi::os-lib:0.10.7" | |
| import weaver.* | |
| import os.Path | |
| object ExampleSuite extends FunSuite { | |
| test("os-lib test") { | |
| val path: os.Path = ??? |
NewerOlder