halotukozak.alpaca.internal

Members list

Type members

Classlikes

object withDefault

Attributes

Companion
class
Source
WithDefault.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final infix class withDefault[Provided, Fallback]

Emulates a default type argument, which Scala 3 doesn't have.

Emulates a default type argument, which Scala 3 doesn't have.

lexer and Parser take a using Ctx withDefault D clause, so lexer { ... } and extends Parser without a type argument infer Ctx = D, while an explicit [MyCtx] keeps MyCtx. The given is always found by the compiler; this is an implementation detail and never needs to be written or provided by users.

Type parameters

Fallback

the default type

Provided

the provided type

Attributes

Companion
object
Source
WithDefault.scala
Supertypes
class Object
trait Matchable
class Any

Types

type ValidName = String & Singleton

Type alias for valid token names.

Type alias for valid token names.

Token names must be singleton strings (string literals) to enable compile-time type safety.

Attributes

Source
ValidName.scala