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
//> using scala 3.3.1 | |
//> using dep org.typelevel::cats-parse:1.0.0 | |
//> using dep org.typelevel::kittens:3.1.0 | |
import cats.parse.Rfc5234.* | |
import cats.parse.{Parser, Parser0, Numbers} | |
import cats.Monoid | |
import cats.syntax.all.* | |
import cats.derived.* | |
case class Cubes(blue: Int, red: Int, green: Int) derives Monoid: |
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 examples | |
import org.typelevel.twiddles._ | |
import cats.Applicative | |
object Example { | |
trait Json | |
trait Decoder[A] { | |
def decode(s: Json): Option[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
/* | |
* Copyright 2001-2013 Artima, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
//> using scala "3.2.1" | |
//> using lib "org.scodec::scodec-bits:1.1.34" | |
//> using lib "co.fs2::fs2-io:3.4.0" | |
import scodec.bits.* | |
import cats.effect.IO | |
import cats.effect.unsafe.implicits.global | |
import fs2.{Stream, Chunk} | |
import fs2.io.file.{Files, Path} |
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
➜ ~/.ivy2/local/com.indoorvivants/bindgen_native0.4_3/0.0.10+3-e5a1879b-SNAPSHOT/jars/bindgen_native0.4_3-osx-x86_64.jar --header /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/pcap.h --clang-include "/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include" --package pcap --scala --info > pcap.scala | |
[bindgen] info Using following clang flags: List(-I/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include) | |
[bindgen] warn clang: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) | |
[bindgen] warn clang: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) | |
[bindgen] warn clang: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) | |
[bindgen] warn clang: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) | |
[bindgen] warn clang: warning: pointer is missing a nullability type specifie |
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
//> using scala "3.1.2" | |
//> using lib "co.fs2::fs2-io:3.2.11" | |
//> using lib "co.fs2::fs2-protocols:3.2.11" | |
//> using lib "com.monovore::decline::2.2.0" | |
import cats.data.NonEmptyList | |
import cats.effect.{ExitCode, IO, IOApp} | |
import cats.syntax.all.* | |
import com.comcast.ip4s.* | |
import com.monovore.decline.* |
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
// using scala 3.1.1-RC2 | |
trait Monad[F[_]]: | |
def unit[A](a: => A): F[A] | |
extension [A](fa: F[A]) | |
def flatMap[B](f: A => F[B]): F[B] | |
def map[B](f: A => B): F[B] = | |
flatMap(a => unit(f(a))) | |
object Monad: | |
given function0Monad: Monad[Function0] with |
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
// using scala 3.1.0 | |
import scala.deriving.Mirror | |
object Mirrors: | |
extension [A <: Product](a: A)(using m: Mirror.ProductOf[A]) | |
def toTuple: m.MirroredElemTypes = Tuple.fromProductTyped(a) | |
extension [T <: Tuple](t: T) |
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
/* | |
* Copyright 2020 Daniel Spiewak | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
sbt:root> release | |
[info] Starting release process off commit: 6b15fef26819736b722c1e46e26ef7347062f094 | |
[info] Checking remote [origin] ... | |
[info] Setting scala version to 2.11.12 | |
[info] set current project to root (in build file:/Users/MPilqu0037e/Development/oss/scodec-bits/) | |
[info] Setting scala version to 2.12.11 | |
[info] set current project to root (in build file:/Users/MPilqu0037e/Development/oss/scodec-bits/) | |
[info] Setting scala version to 2.13.2 | |
[info] set current project to root (in build file:/Users/MPilqu0037e/Development/oss/scodec-bits/) | |
[info] Setting scala version to 0.26.0-RC1 |
NewerOlder