Skip to content

Commit

Permalink
adapt to submodule upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
tribbloid committed Feb 19, 2024
1 parent 656646e commit 37073b6
Show file tree
Hide file tree
Showing 23 changed files with 31 additions and 25 deletions.
4 changes: 2 additions & 2 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ val vs: Versions = versions()

dependencies {

api(project(":macro"))
testFixturesApi(testFixtures(project(":macro")))
api(project(":macro2"))
testFixturesApi(testFixtures(project(":macro2")))
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package shapesafe.core.debugging

import ai.acyclic.prover.commons.graph.local.Local
import ai.acyclic.prover.commons.meta2.ProductDiscovery
import ai.acyclic.prover.commons.meta.ProductDiscovery

trait ExpressionType extends CanPeek {}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/shapesafe/core/util/Constraint.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ trait Constraint {}

object Constraint {

import ai.acyclic.prover.commons.meta2.ScalaReflection._
import ai.acyclic.prover.commons.meta.ScalaReflection._

// TODO: why reinventing the wheel? shapeless LUBConstraint is the same
case class ElementOfType[Data <: HList, Element: TypeTag]() extends Constraint {
Expand Down
2 changes: 1 addition & 1 deletion core/src/testFixtures/scala/shapesafe/BaseSpec.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package shapesafe

import ai.acyclic.prover.commons.testlib
import ai.acyclic.prover.commons.meta2.ScalaReflection
import ai.acyclic.prover.commons.meta.ScalaReflection
import ai.acyclic.prover.commons.viz.TypeViz
import shapesafe.m.viz.PeekCT
import shapeless.{HList, Nat, Witness}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package shapesafe.m

import ai.acyclic.prover.commons.meta2.Reflection
import ai.acyclic.prover.commons.meta.ScalaReflection
import singleton.ops.impl.Op

import java.util.logging.Logger
Expand Down Expand Up @@ -35,7 +35,7 @@ object GenericMsgEmitter {

def byType[A, SSS <: GenericMsgEmitter.EmitLevel](
implicit
_ttg: Reflection.Runtime.TypeTag[A]
_ttg: ScalaReflection.TypeTag[A]
): GenericMsgEmitter[A, SSS] =
macro Macros.byTypeTag[A, SSS]

Expand Down Expand Up @@ -101,8 +101,8 @@ object GenericMsgEmitter {

val aa: Type = weakTypeOf[A]

val ttg: Reflection.Runtime.TypeTag[A] = c.eval(c.Expr[Reflection.Runtime.TypeTag[A]](c.untypecheck(q"${_ttg}")))
val v = Reflection.Runtime.typeView(ttg.tpe).singletonName
val ttg: ScalaReflection.TypeTag[A] = c.eval(c.Expr[ScalaReflection.TypeTag[A]](c.untypecheck(q"${_ttg}")))
val v = ScalaReflection.typeView(ttg.tpe).singletonName

val ll = emitValue[LL](v)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package shapesafe.m

import ai.acyclic.prover.commons.meta2.MacroReflection
import ai.acyclic.prover.commons.refl.Reflection
import ai.acyclic.prover.commons.viz.TypeViz

import scala.reflect.macros.blackbox
Expand All @@ -18,7 +18,12 @@ trait MWithReflection {
c.parse(name)
}

lazy val refl = MacroReflection[u.type](c.universe)
object refl extends Reflection.CompileTime {

final override lazy val universe: MWithReflection.this.u.type = MWithReflection.this.u

}

lazy val viz = TypeViz.default(refl)

// case class MacroError(message: String) extends Exception(message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object PeerType {

case v: SingletonType =>
val ttView = refl.typeView(v)
val baseTypes = ttView.baseTypes.map(_.self)
val baseTypes = ttView.baseTypes // .map(_.value)

val chosen = baseTypes.flatMap {
case NoType => None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package shapesafe.m.viz

import ai.acyclic.prover.commons.meta2.format.Formats0.KindName
import ai.acyclic.prover.commons.meta2.format.{EnableOvrd, TypeFormat}
import ai.acyclic.prover.commons.viz.format.Formats0.KindName
import ai.acyclic.prover.commons.viz.format.{EnableOvrd, TypeFormat}

import scala.language.experimental.macros

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package shapesafe.m.viz

import ai.acyclic.prover.commons.meta2.format.Formats0.TypeInfo
import ai.acyclic.prover.commons.meta2.format.Formats1.{RecursiveForm, Trials}
import ai.acyclic.prover.commons.meta2.format.{FormatOvrd, TypeFormat}
import ai.acyclic.prover.commons.viz.format.Formats0.TypeInfo
import ai.acyclic.prover.commons.viz.format.Formats1.{RecursiveForm, Trials}
import ai.acyclic.prover.commons.viz.format.{FormatOvrd, TypeFormat}

import scala.language.experimental.macros

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package shapesafe.m.viz

import ai.acyclic.prover.commons.meta2.format.{Formats0, TypeFormat}
import ai.acyclic.prover.commons.viz.format.{Formats0, TypeFormat}

import scala.language.experimental.macros

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package shapesafe.m.viz

import ai.acyclic.prover.commons.HasOuter
import ai.acyclic.prover.commons.meta2.format.TypeFormat
import ai.acyclic.prover.commons.viz.TypeViz
import ai.acyclic.prover.commons.viz.format.TypeFormat
import shapesafe.m.{Emit, MWithReflection}
import singleton.ops.+

Expand Down Expand Up @@ -110,7 +110,7 @@ object VizCTSystem {
SELF <: VizCTSystem: c.WeakTypeTag
]: c.Tree = {

val tt: Type = weakTypeOf[T]
val tt = refl.TypeView(weakTypeOf[T])

val (self, liftSelf) = getSystem(weakTypeOf[SELF].dealias)

Expand All @@ -124,7 +124,7 @@ object VizCTSystem {
viz.withFormat(self.typeFormat).of(tt).diagram_hierarchy.toString
} else {

refl.typeView(tt).formattedBy(self.typeFormat).text
refl.TypeOps(tt).formattedBy(self.typeFormat).text
}

str
Expand All @@ -136,7 +136,7 @@ object VizCTSystem {
"[ ERROR ] " + e.toString
}

q"$liftSelf.createInfoOf[$tt, $result]"
q"$liftSelf.createInfoOf[${tt.unbox}, $result]"
}

// def T[A: WeakTypeTag]: Tree = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package shapesafe.m.viz

import ai.acyclic.prover.commons.meta2.format.FormatOvrd.{~~, SingletonName}
import ai.acyclic.prover.commons.viz.format.FormatOvrd.{~~, SingletonName}
import shapesafe.m.GenericMsgEmitter
import shapeless.Witness
import singleton.ops.+
Expand Down
2 changes: 1 addition & 1 deletion prover-commons
Submodule prover-commons updated 64 files
+1 −1 buildSrc
+10 −10 gradlew.bat
+48 −0 module/core/src/main/scala/ai/acyclic/prover/commons/Delegating.scala
+4 −10 module/core/src/main/scala/ai/acyclic/prover/commons/Envs.scala
+2 −0 module/core/src/main/scala/ai/acyclic/prover/commons/__Glossary.scala
+2 −2 module/core/src/main/scala/ai/acyclic/prover/commons/function/api/FnLike.scala
+8 −4 module/core/src/main/scala/ai/acyclic/prover/commons/function/api/HasPolyLike.scala
+64 −17 module/core/src/main/scala/ai/acyclic/prover/commons/graph/Engine.scala
+6 −6 module/core/src/main/scala/ai/acyclic/prover/commons/graph/NodeK.scala
+1 −1 module/core/src/main/scala/ai/acyclic/prover/commons/graph/local/Local.scala
+4 −4 module/core/src/main/scala/ai/acyclic/prover/commons/graph/viz/LinkedHierarchy.scala
+1 −1 module/core/src/test/scala/ai/acyclic/prover/commons/function/PreDefSpec.scala
+28 −24 module/core/src/test/scala/ai/acyclic/prover/commons/graph/GraphFixture.scala
+3 −3 module/core/src/test/scala/ai/acyclic/prover/commons/graph/TreeFixture.scala
+5 −4 module/core/src/test/scala/ai/acyclic/prover/commons/graph/local/ops/AnyGraphBinarySpec.scala
+6 −5 module/core/src/test/scala/ai/acyclic/prover/commons/graph/local/ops/AnyGraphUnarySpec.scala
+4 −4 module/core/src/test/scala/ai/acyclic/prover/commons/graph/viz/FlowSpec.scala
+5 −5 module/core/src/test/scala/ai/acyclic/prover/commons/graph/viz/LinkedHierarchySpec.scala
+8 −0 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta/HasITyper.scala
+7 −4 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta/HasUniverse.scala
+14 −0 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta/ITyper.scala
+5 −5 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta/ProductDiscovery.scala
+1 −1 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta/RuntimeTagRelay.scala
+5 −0 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta/ScalaReflection.scala
+6 −6 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta/SymbolViewMixin.scala
+47 −37 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta/TypeViewMixin.scala
+13 −0 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta/__MetaDesign.scala
+4 −3 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta/package.scala
+0 −28 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta2/Reflection.scala
+0 −45 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta2/format/Formats0.scala
+0 −8 module/meta2/src/main/scala/ai/acyclic/prover/commons/meta2/format/package.scala
+8 −0 module/meta2/src/main/scala/ai/acyclic/prover/commons/refl/HasReflection.scala
+24 −0 module/meta2/src/main/scala/ai/acyclic/prover/commons/refl/Reflection.scala
+9 −8 module/meta2/src/main/scala/ai/acyclic/prover/commons/refl/TypeIRMixin.scala
+3 −0 module/meta2/src/main/scala/ai/acyclic/prover/commons/refl/package.scala
+0 −11 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/HasReflection.scala
+1 −1 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/TypeHierarchy.scala
+8 −6 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/TypeIROutput.scala
+16 −18 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/TypeOfMixin.scala
+2 −2 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/TypeViz.scala
+2 −1 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/TypeVizBuilder.scala
+1 −1 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/WideTyped.scala
+1 −1 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/format/Backtracking.scala
+8 −12 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/format/EnableOvrd.scala
+6 −5 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/format/FormatOvrd.scala
+47 −0 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/format/Formats0.scala
+18 −16 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/format/Formats1.scala
+5 −4 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/format/TypeFormat.scala
+11 −0 module/meta2/src/main/scala/ai/acyclic/prover/commons/viz/format/package.scala
+1 −1 module/meta2/src/test/scala/ai/acyclic/prover/commons/meta/RuntimeTagRelaySpec.scala
+5 −5 module/meta2/src/test/scala/ai/acyclic/prover/commons/meta/TypeViewMixinSpec.scala
+0 −10 module/meta2/src/test/scala/ai/acyclic/prover/commons/meta2/format/BacktrackingDummy.scala
+0 −3 module/meta2/src/test/scala/ai/acyclic/prover/commons/meta2/format/beans/package.scala
+3 −0 module/meta2/src/test/scala/ai/acyclic/prover/commons/refl/package.scala
+2 −1 module/meta2/src/test/scala/ai/acyclic/prover/commons/viz/TypeVizSpec.scala
+12 −0 module/meta2/src/test/scala/ai/acyclic/prover/commons/viz/format/BacktrackingDummy.scala
+6 −5 module/meta2/src/test/scala/ai/acyclic/prover/commons/viz/format/FormatOvrdSpec.scala
+7 −5 module/meta2/src/test/scala/ai/acyclic/prover/commons/viz/format/Formats1Spec.scala
+3 −3 module/meta2/src/test/scala/ai/acyclic/prover/commons/viz/format/TypeFormatSpec.scala
+2 −2 module/meta2/src/test/scala/ai/acyclic/prover/commons/viz/format/beans/Beans.scala
+3 −0 module/meta2/src/test/scala/ai/acyclic/prover/commons/viz/format/beans/package.scala
+25 −10 notebook/src/test/scala/ai/acyclic/prover/commons/notebook/ForwardPlot.scala
+2 −2 notebook/src/test/scala/ai/acyclic/prover/commons/notebook/PathToDOT.scala
+1 −1 notebook/src/test/scala/ai/acyclic/prover/commons/notebook/SplainPluginVersions.scala
3 changes: 2 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ include(":prover-commons")
project(":prover-commons").projectDir = file("prover-commons/module")
include(":prover-commons:core")
include(":prover-commons:meta2")
//include(":prover-commons:spark")

include(
// should be skipped on CI, contains local experiments only
":macro",
":macro2",
// uses unstable & experimental scala features, should be modified very slowly & carefully
":core",
// // uses common scala features
Expand Down

0 comments on commit 37073b6

Please sign in to comment.