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
2023.07.14 12:33:50 INFO Started: Metals version 0.11.12 in workspace '/home/miles/projects/gsp-graphql' for client Neovim 0.9.1. | |
Jul 14, 2023 12:33:50 PM org.flywaydb.core.internal.license.VersionPrinter printVersionOnly | |
INFO: Flyway Community Edition 9.16.3 by Redgate | |
Jul 14, 2023 12:33:50 PM org.flywaydb.core.internal.license.VersionPrinter printVersion | |
INFO: See release notes here: https://rd.gt/416ObMi | |
Jul 14, 2023 12:33:50 PM org.flywaydb.core.internal.license.VersionPrinter printVersion | |
INFO: | |
Jul 14, 2023 12:33:50 PM org.flywaydb.core.internal.database.base.BaseDatabaseType createDatabase | |
INFO: Database: jdbc:h2:file:/home/miles/projects/gsp-graphql/.metals/metals (H2 2.1) | |
Jul 14, 2023 12:33:50 PM org.flywaydb.core.internal.command.DbValidate validate |
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
java.net.ConnectException: Connection refused | |
| => sat java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.checkConnect(Native Method) | |
at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:252) | |
at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:198) | |
at java.base/sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213) | |
at java.base/sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:306) | |
at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) | |
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) | |
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) | |
at java.base/java.lang.Thread.run(Thread.java:829) |
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
miles@tarski:~% cs launch scala3-repl | |
scala> trait A | |
| trait B | |
| type M[X] = X match | |
| case A => Int | |
| case B => String | |
| | |
// defined trait A | |
// defined trait B |
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.{Applicative, Monad} | |
import cats.implicits._ | |
abstract class Foo[+M[_[_]], F[_]](implicit val M: M[F]) | |
trait Bar[F[_]] extends Foo[Applicative, F] { def bar = Applicative[F] } | |
trait Baz[F[_]] extends Foo[Monad, F] { def baz = Monad[F] } | |
class User[F[_]: Monad] extends Bar[F] with Baz[F] | |
object Test { |
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.{Applicative, Monad} | |
import cats.implicits._ | |
abstract class Foo[+M[_[_]], F[_]](implicit val M: M[F]) | |
trait Bar[F[_]] extends Foo[Applicative, F] { def bar = Applicative[F] } | |
trait Baz[F[_]] extends Foo[Monad, F] { def baz = Monad[F] } | |
class User[F[_]: Monad] extends Bar[F] with Baz[F] | |
object Test { |
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 (c) 2019 Miles Sabin | |
* | |
* 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
def tupleType(tpes: List[Type]): Type = { | |
val PairType = typeOf[_ *: _] match { | |
case Type.IsAppliedType(tp) => tp.tycon | |
} | |
@tailrec | |
def nestedPairs(tpes: List[Type], acc: Type): Type = tpes match { | |
case Nil => acc | |
case hd :: tail => nestedPairs(tail, Type.AppliedType(PairType, List(hd, acc))) | |
} |
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
object Utils { | |
type Id[t] = t | |
type Const[c] = [t] => c | |
} | |
import Utils._ | |
class Instances[F[_[_]], T[_]] | |
trait Functor[F[_]] |
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
// local/localtests/test/localtests/LocalTests.scala | |
package localtests | |
import java.nio.file._ | |
import java.util.stream.{ Stream => JStream } | |
import org.junit.{ AfterClass, Test } | |
import scala.collection.JavaConverters._ | |
import scala.concurrent.duration._ |
NewerOlder