-
Notifications
You must be signed in to change notification settings - Fork 1.1k
DRAFT (seeking feedback) : started refactoring of Quotes.reflect into a top level package #24833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kalin-Rudnicki
wants to merge
1
commit into
scala:main
Choose a base branch
from
Kalin-Rudnicki:current/refactor/quotes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
184 changes: 184 additions & 0 deletions
184
compiler/src/scala/quoted/compiletime/internal/ConstantImpl.scala
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,184 @@ | ||
| package scala.quoted.compiletime.internal | ||
|
|
||
| import dotty.tools.dotc | ||
| import scala.quoted.compiletime as pub | ||
|
|
||
| /////// Constant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type Constant = pub.Constant & ConstantImpl | ||
| sealed trait ConstantImpl { _self: pub.Constant => } | ||
| object ConstantImpl { | ||
| def apply(c: dotc.core.Constants.Constant): ConstantImpl = c.tag match { | ||
| case dotc.core.Constants.BooleanTag => BooleanConstantImpl(c.booleanValue) | ||
| case dotc.core.Constants.ByteTag => ByteConstantImpl(c.byteValue) | ||
| case dotc.core.Constants.ShortTag => ShortConstantImpl(c.shortValue) | ||
| case dotc.core.Constants.IntTag => IntConstantImpl(c.intValue) | ||
| case dotc.core.Constants.LongTag => LongConstantImpl(c.longValue) | ||
| case dotc.core.Constants.FloatTag => FloatConstantImpl(c.floatValue) | ||
| case dotc.core.Constants.DoubleTag => DoubleConstantImpl(c.doubleValue) | ||
| case dotc.core.Constants.CharTag => CharConstantImpl(c.charValue) | ||
| case dotc.core.Constants.StringTag => StringConstantImpl(c.stringValue) | ||
| case dotc.core.Constants.UnitTag => UnitConstantImpl() | ||
| case dotc.core.Constants.NullTag => NullConstantImpl() | ||
| case dotc.core.Constants.ClazzTag => ClassOfConstantImpl(TypeReprImpl(c.typeValue)) | ||
| } | ||
|
|
||
| object Module extends pub.Constant.Module {} | ||
|
|
||
| } | ||
|
|
||
| /////// BooleanConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type BooleanConstant = BooleanConstantImpl | ||
| final case class BooleanConstantImpl(value: Boolean) extends ConstantImpl, pub.BooleanConstant | ||
| object BooleanConstantImpl { | ||
|
|
||
| object Module extends pub.BooleanConstant.Module { | ||
| override def apply(x: Boolean): BooleanConstant = BooleanConstantImpl(x) | ||
| override def make(x: Boolean): BooleanConstant = BooleanConstantImpl(x) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// ByteConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type ByteConstant = ByteConstantImpl | ||
| final case class ByteConstantImpl(value: Byte) extends ConstantImpl, pub.ByteConstant | ||
| object ByteConstantImpl { | ||
|
|
||
| object Module extends pub.ByteConstant.Module { | ||
| override def apply(x: Byte): ByteConstant = ByteConstantImpl(x) | ||
| override def make(x: Byte): ByteConstant = ByteConstantImpl(x) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// ShortConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type ShortConstant = ShortConstantImpl | ||
| final case class ShortConstantImpl(value: Short) extends ConstantImpl, pub.ShortConstant | ||
| object ShortConstantImpl { | ||
|
|
||
| object Module extends pub.ShortConstant.Module { | ||
| override def apply(x: Short): ShortConstant = ShortConstantImpl(x) | ||
| override def make(x: Short): ShortConstant = ShortConstantImpl(x) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// IntConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type IntConstant = IntConstantImpl | ||
| final case class IntConstantImpl(value: Int) extends ConstantImpl, pub.IntConstant | ||
| object IntConstantImpl { | ||
|
|
||
| object Module extends pub.IntConstant.Module { | ||
| override def apply(x: Int): IntConstant = IntConstantImpl(x) | ||
| override def make(x: Int): IntConstant = IntConstantImpl(x) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// LongConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type LongConstant = LongConstantImpl | ||
| final case class LongConstantImpl(value: Long) extends ConstantImpl, pub.LongConstant | ||
| object LongConstantImpl { | ||
|
|
||
| object Module extends pub.LongConstant.Module { | ||
| override def apply(x: Long): LongConstant = LongConstantImpl(x) | ||
| override def make(x: Long): LongConstant = LongConstantImpl(x) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// FloatConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type FloatConstant = FloatConstantImpl | ||
| final case class FloatConstantImpl(value: Float) extends ConstantImpl, pub.FloatConstant | ||
| object FloatConstantImpl { | ||
|
|
||
| object Module extends pub.FloatConstant.Module { | ||
| override def apply(x: Float): FloatConstant = FloatConstantImpl(x) | ||
| override def make(x: Float): FloatConstant = FloatConstantImpl(x) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// DoubleConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type DoubleConstant = DoubleConstantImpl | ||
| final case class DoubleConstantImpl(value: Double) extends ConstantImpl, pub.DoubleConstant | ||
| object DoubleConstantImpl { | ||
|
|
||
| object Module extends pub.DoubleConstant.Module { | ||
| override def apply(x: Double): DoubleConstant = DoubleConstantImpl(x) | ||
| override def make(x: Double): DoubleConstant = DoubleConstantImpl(x) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// CharConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type CharConstant = CharConstantImpl | ||
| final case class CharConstantImpl(value: Char) extends ConstantImpl, pub.CharConstant | ||
| object CharConstantImpl { | ||
|
|
||
| object Module extends pub.CharConstant.Module { | ||
| override def apply(x: Char): CharConstant = CharConstantImpl(x) | ||
| override def make(x: Char): CharConstant = CharConstantImpl(x) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// StringConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type StringConstant = StringConstantImpl | ||
| final case class StringConstantImpl(value: String) extends ConstantImpl, pub.StringConstant | ||
| object StringConstantImpl { | ||
|
|
||
| object Module extends pub.StringConstant.Module { | ||
| override def apply(x: String): StringConstant = StringConstantImpl(x) | ||
| override def make(x: String): StringConstant = StringConstantImpl(x) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// UnitConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type UnitConstant = UnitConstantImpl | ||
| final case class UnitConstantImpl() extends ConstantImpl, pub.UnitConstant { override def value: Unit = () } | ||
| object UnitConstantImpl { | ||
|
|
||
| object Module extends pub.UnitConstant.Module { | ||
| override def apply(): UnitConstant = UnitConstantImpl() | ||
| override def make(): UnitConstant = UnitConstantImpl() | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// NullConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type NullConstant = NullConstantImpl | ||
| final case class NullConstantImpl() extends ConstantImpl, pub.NullConstant { override def value: Null = null } | ||
| object NullConstantImpl { | ||
|
|
||
| object Module extends pub.NullConstant.Module { | ||
| override def apply(): NullConstant = NullConstantImpl() | ||
| override def make(): NullConstant = NullConstantImpl() | ||
| } | ||
|
|
||
| } | ||
|
|
||
| /////// ClassOfConstant /////////////////////////////////////////////////////////////// | ||
|
|
||
| type ClassOfConstant = ClassOfConstantImpl | ||
| final case class ClassOfConstantImpl(value: TypeReprImpl) extends ConstantImpl, pub.ClassOfConstant | ||
| object ClassOfConstantImpl { | ||
|
|
||
| object Module extends pub.ClassOfConstant.Module { | ||
| override def apply(x: pub.TypeRepr): ClassOfConstant = ClassOfConstantImpl(x.asInstanceOf[TypeReprImpl]) | ||
| override def make(x: pub.TypeRepr): ClassOfConstant = ClassOfConstantImpl(x.asInstanceOf[TypeReprImpl]) | ||
| } | ||
|
|
||
| } | ||
80 changes: 80 additions & 0 deletions
80
compiler/src/scala/quoted/compiletime/internal/FlagsImpl.scala
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| package scala.quoted.compiletime.internal | ||
|
|
||
| import dotty.tools.dotc | ||
| import scala.quoted.compiletime as pub | ||
|
|
||
| type Flags = FlagsImpl | ||
| final class FlagsImpl(val underlying: dotc.core.Flags.FlagSet) extends pub.Flags { | ||
|
|
||
| override def is(that: pub.Flags): Boolean = | ||
| val thatImpl = that.asInstanceOf[FlagsImpl] | ||
| underlying.isAllOf(thatImpl.underlying) | ||
|
|
||
| override def |(that: pub.Flags): pub.Flags = | ||
| val thatImpl = that.asInstanceOf[FlagsImpl] | ||
| new FlagsImpl(underlying | thatImpl.underlying) | ||
|
|
||
| override def &(that: pub.Flags): pub.Flags = | ||
| val thatImpl = that.asInstanceOf[FlagsImpl] | ||
| new FlagsImpl(underlying & thatImpl.underlying) | ||
|
|
||
| override def show: String = underlying.toString | ||
|
|
||
| override def toString: String = underlying.toString | ||
| override lazy val hashCode: Int = underlying.hashCode | ||
| override def equals(that: Any): Boolean = that.asInstanceOf[Matchable] match | ||
| case that: FlagsImpl => this.underlying == that.underlying | ||
| case _ => false | ||
|
|
||
| } | ||
| object FlagsImpl { | ||
| object Module extends pub.Flags.Module { | ||
| def Abstract: pub.Flags = new FlagsImpl(dotc.core.Flags.Abstract) | ||
| def AbsOverride: pub.Flags = new FlagsImpl(dotc.core.Flags.AbsOverride) | ||
| def Artifact: pub.Flags = new FlagsImpl(dotc.core.Flags.Artifact) | ||
| def Case: pub.Flags = new FlagsImpl(dotc.core.Flags.Case) | ||
| def CaseAccessor: pub.Flags = new FlagsImpl(dotc.core.Flags.CaseAccessor) | ||
| def Contravariant: pub.Flags = new FlagsImpl(dotc.core.Flags.Contravariant) | ||
| def Covariant: pub.Flags = new FlagsImpl(dotc.core.Flags.Covariant) | ||
| def Deferred: pub.Flags = new FlagsImpl(dotc.core.Flags.Deferred) | ||
| def EmptyFlags: pub.Flags = new FlagsImpl(dotc.core.Flags.EmptyFlags) | ||
| def Enum: pub.Flags = new FlagsImpl(dotc.core.Flags.Enum) | ||
| def Erased: pub.Flags = new FlagsImpl(dotc.core.Flags.Erased) | ||
| def Exported: pub.Flags = new FlagsImpl(dotc.core.Flags.Exported) | ||
| def ExtensionMethod: pub.Flags = new FlagsImpl(dotc.core.Flags.ExtensionMethod) | ||
| def FieldAccessor: pub.Flags = new FlagsImpl(dotc.core.Flags.Accessor) | ||
| def Final: pub.Flags = new FlagsImpl(dotc.core.Flags.Final) | ||
| def Given: pub.Flags = new FlagsImpl(dotc.core.Flags.Given) | ||
| def HasDefault: pub.Flags = new FlagsImpl(dotc.core.Flags.HasDefault) | ||
| def Implicit: pub.Flags = new FlagsImpl(dotc.core.Flags.Implicit) | ||
| def Infix: pub.Flags = new FlagsImpl(dotc.core.Flags.Infix) | ||
| def Inline: pub.Flags = new FlagsImpl(dotc.core.Flags.Inline) | ||
| def Invisible: pub.Flags = new FlagsImpl(dotc.core.Flags.Invisible) | ||
| def JavaDefined: pub.Flags = new FlagsImpl(dotc.core.Flags.JavaDefined) | ||
| def JavaStatic: pub.Flags = new FlagsImpl(dotc.core.Flags.JavaStatic) | ||
| def JavaAnnotation: pub.Flags = new FlagsImpl(dotc.core.Flags.JavaAnnotation) | ||
| def Lazy: pub.Flags = new FlagsImpl(dotc.core.Flags.Lazy) | ||
| def Local: pub.Flags = new FlagsImpl(dotc.core.Flags.Local) | ||
| def Macro: pub.Flags = new FlagsImpl(dotc.core.Flags.Macro) | ||
| def Method: pub.Flags = new FlagsImpl(dotc.core.Flags.Method) | ||
| def Module: pub.Flags = new FlagsImpl(dotc.core.Flags.Module) | ||
| def Mutable: pub.Flags = new FlagsImpl(dotc.core.Flags.Mutable) | ||
| def NoInits: pub.Flags = new FlagsImpl(dotc.core.Flags.NoInits) | ||
| def Opaque: pub.Flags = new FlagsImpl(dotc.core.Flags.Opaque) | ||
| def Open: pub.Flags = new FlagsImpl(dotc.core.Flags.Open) | ||
| def Override: pub.Flags = new FlagsImpl(dotc.core.Flags.Override) | ||
| def Package: pub.Flags = new FlagsImpl(dotc.core.Flags.Package) | ||
| def Param: pub.Flags = new FlagsImpl(dotc.core.Flags.Param) | ||
| def ParamAccessor: pub.Flags = new FlagsImpl(dotc.core.Flags.ParamAccessor) | ||
| def Private: pub.Flags = new FlagsImpl(dotc.core.Flags.Private) | ||
| def PrivateLocal: pub.Flags = new FlagsImpl(dotc.core.Flags.Private | dotc.core.Flags.Local) | ||
| def Protected: pub.Flags = new FlagsImpl(dotc.core.Flags.Protected) | ||
| def Scala2x: pub.Flags = new FlagsImpl(dotc.core.Flags.Scala2x) | ||
| def Sealed: pub.Flags = new FlagsImpl(dotc.core.Flags.Sealed) | ||
| def StableRealizable: pub.Flags = new FlagsImpl(dotc.core.Flags.StableRealizable) | ||
| def Static: pub.Flags = new FlagsImpl(dotc.core.Flags.JavaStatic) | ||
| def Synthetic: pub.Flags = new FlagsImpl(dotc.core.Flags.Synthetic) | ||
| def Trait: pub.Flags = new FlagsImpl(dotc.core.Flags.Trait) | ||
| def Transparent: pub.Flags = new FlagsImpl(dotc.core.Flags.Transparent) | ||
| } | ||
| } |
50 changes: 50 additions & 0 deletions
50
compiler/src/scala/quoted/compiletime/internal/ParamClauseImpl.scala
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package scala.quoted.compiletime.internal | ||
|
|
||
| import dotty.tools.dotc.ast.tpd | ||
| import scala.annotation.experimental | ||
| import scala.quoted.compiletime as pub | ||
|
|
||
| /////// ParamClause /////////////////////////////////////////////////////////////// | ||
|
|
||
| type ParamClause = pub.ParamClause & ParamClauseImpl | ||
| sealed trait ParamClauseImpl { _self: pub.ParamClause => | ||
| val underlying: tpd.ParamClause | ||
| } | ||
| object ParamClauseImpl { | ||
| def apply(x: tpd.ParamClause): ParamClauseImpl = x match { | ||
| case x: List[tpd.ValDef] @unchecked if x.isEmpty || x.head.isInstanceOf[tpd.ValDef] => new TermParamClauseImpl(x) | ||
| case x: List[tpd.TypeDef] @unchecked if x.isEmpty || x.head.isInstanceOf[tpd.TypeDef] => new TypeParamClauseImpl(x) | ||
| case _ => throw new MatchError(x) | ||
| } | ||
| object Module extends pub.ParamClause.Module {} | ||
| } | ||
|
|
||
| /////// TermParamClause /////////////////////////////////////////////////////////////// | ||
|
|
||
| type TermParamClause = TermParamClauseImpl | ||
| final class TermParamClauseImpl(val underlying: List[tpd.ValDef]) extends ParamClauseImpl, pub.TermParamClause { | ||
| override def params: List[pub.ValDef] = ??? | ||
| override def isImplicit: Boolean = ??? | ||
| override def isGiven: Boolean = ??? | ||
| @experimental override def erasedArgs: List[Boolean] = ??? | ||
| @experimental override def hasErasedArgs: Boolean = ??? | ||
| } | ||
| object TermParamClauseImpl { | ||
| object Module extends pub.TermParamClause.Module { | ||
| override def apply(params: List[pub.ValDef]): pub.TermParamClause = ??? | ||
| override def make(params: List[pub.ValDef]): pub.TermParamClause = ??? | ||
| } | ||
| } | ||
|
|
||
| /////// TypeParamClause /////////////////////////////////////////////////////////////// | ||
|
|
||
| type TypeParamClause = TypeParamClauseImpl | ||
| final class TypeParamClauseImpl(val underlying: List[tpd.TypeDef]) extends ParamClauseImpl, pub.TypeParamClause { | ||
| override def params: List[pub.TypeDef] = ??? | ||
| } | ||
| object TypeParamClauseImpl { | ||
| object Module extends pub.TypeParamClause.Module { | ||
| override def apply(params: List[pub.TypeDef]): pub.TypeParamClause = ??? | ||
| override def make(params: List[pub.TypeDef]): pub.TypeParamClause = ??? | ||
| } | ||
| } |
52 changes: 52 additions & 0 deletions
52
compiler/src/scala/quoted/compiletime/internal/PositionImpl.scala
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| package scala.quoted.compiletime.internal | ||
|
|
||
| import dotty.tools.dotc | ||
| import dotty.tools.dotc.core.Contexts.* | ||
| import dotty.tools.dotc.quoted.MacroExpansion | ||
| import scala.quoted.compiletime as pub | ||
|
|
||
| type Position = PositionImpl | ||
| final case class PositionImpl(position: dotc.util.SourcePosition) extends pub.Position { | ||
|
|
||
| override lazy val start: Int = position.start | ||
|
|
||
| override lazy val end: Int = position.end | ||
|
|
||
| override lazy val sourceFile: SourceFile = SourceFileImpl(position.source) | ||
|
|
||
| override lazy val startLine: Int = position.startLine | ||
|
|
||
| override lazy val endLine: Int = position.endLine | ||
|
|
||
| override lazy val startColumn: Int = position.startColumn | ||
|
|
||
| override lazy val endColumn: Int = position.endColumn | ||
|
|
||
| override lazy val sourceCode: Option[String] = | ||
| val contents = position.source.content() | ||
| if contents.length < position.end then None | ||
| else Some(new String(contents, position.start, position.end - position.start)) | ||
|
|
||
| override def toString: String = position.toString | ||
| override lazy val hashCode: Int = position.hashCode | ||
| override def equals(that: Any): Boolean = that.asInstanceOf[Matchable] match | ||
| case that: PositionImpl => this.position == that.position | ||
| case _ => false | ||
|
|
||
| } | ||
| object PositionImpl { | ||
|
|
||
| final class Module(using val ctx: Context) extends pub.Position.Module { | ||
|
|
||
| override def ofMacroExpansion: Position = | ||
| PositionImpl(MacroExpansion.position.getOrElse(dotc.util.SourcePosition(ctx.source, dotc.util.Spans.NoSpan))) | ||
|
|
||
| override def apply(sourceFile: pub.SourceFile, start: Int, end: Int): Position = | ||
| make(sourceFile, start, end) | ||
|
|
||
| override def make(sourceFile: pub.SourceFile, start: Int, end: Int): Position = | ||
| PositionImpl(dotc.util.SourcePosition(sourceFile.cast.sourceFile, dotc.util.Spans.Span(start, end))) | ||
|
|
||
| } | ||
|
|
||
| } |
26 changes: 26 additions & 0 deletions
26
compiler/src/scala/quoted/compiletime/internal/QuotesImpl.scala
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package scala.quoted.compiletime.internal | ||
|
|
||
| import dotty.tools.dotc.core.Contexts.* | ||
| import scala.quoted.compiletime as pub | ||
|
|
||
| object QuotesImpl { | ||
|
|
||
| def apply()(using Context): pub.Quotes = | ||
| new QuotesImpl | ||
|
|
||
| // FIX-PRE-MERGE (KR) : | ||
| /* | ||
| def showDecompiledTree(tree: tpd.Tree)(using Context): String = | ||
| import qctx.reflect.Printer.{TreeCode, TreeAnsiCode} | ||
| val qctx: QuotesImpl = new QuotesImpl(using MacroExpansion.context(tree)) | ||
| if ctx.settings.color.value == "always" then TreeAnsiCode.show(tree) | ||
| else TreeCode.show(tree) | ||
| */ | ||
|
|
||
| } | ||
|
|
||
| final class QuotesImpl private (using val ctx: Context) extends pub.Quotes { | ||
|
|
||
| override lazy val reflectV2: reflectImpl.Module = new reflectImpl.Module | ||
|
|
||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are able to implement
BooleanConstantandBooleanConstant.ModulewithBooleanConstantImplandBooleanConstantImpl.module. The impl of this one is dead simple, so its anobject Module, but there are other such cases withfinal class Module(using val ctx: Context) extends pub.Ex.Module { /* ... */ }.