Here is a trait in package p
package p
trait Aliases { type Env = A with B }
In Scala 2, you could do this:
package object p extends Aliases
// using scala 3.1.0 | |
package mycats: | |
trait Semigroup[A]: | |
def combine(a1: A, a2: A): A | |
class SemigroupOps[A](a1: A)(implicit ev: Semigroup[A]): | |
def combine(a2: A): A = ev.combine(a1, a2) |
// using scala 3.1.0 | |
// using lib org.typelevel::cats-core:2.6.1 | |
package good | |
import cats.Semigroup | |
import cats.syntax.all.* | |
enum Maybe[+A]: | |
case Just(a: A) |
object Notarisation: | |
private case object Proven | |
opaque type Proof <: Singleton = Proven.type | |
given Proof = Proven | |
end Notarisation | |
import Notarisation.Proof |
Here is a trait in package p
package p
trait Aliases { type Env = A with B }
In Scala 2, you could do this:
package object p extends Aliases
type StackT = List[String] | |
type StatT = StackT => StackT | |
type ProgT = List[StatT] | |
def prettyPrint( | |
a: Any, | |
indentSize: Int = 2, | |
maxElementWidth: Int = 60, | |
depth: Int = 0): String = { |