Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
mio-19 committed Dec 18, 2024
1 parent c36b6e6 commit f274832
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import chester.doc.const.{ColorProfile, Docs}
import chester.error.*
import chester.syntax.*
import chester.syntax.core.orm.*
import chester.syntax.core.simple.{ObjectStmtTerm, TelescopeTermF}
import chester.syntax.core.simple.{ObjectStmtTerm}
import chester.uniqid.*
import chester.utils.*
import chester.utils.doc.*
Expand Down Expand Up @@ -956,3 +956,12 @@ trait ObjectTypeTermC[Term <: TermT[Term]] extends TypeTermT[Term] {
cpy(objectDef = g(objectDef))
)
}

@FunctionalInterface
trait TelescopeTermF[Term <: TermT[Term], ThisTree <: TelescopeTermC[Term]] {
def newTelescope(
args: Vector[ArgTermC[Term]],
implicitly: Boolean,
meta: OptionTermMeta
): ThisTree
}
13 changes: 2 additions & 11 deletions syntax/shared/src/main/scala/chester/syntax/core/simple.scala
Original file line number Diff line number Diff line change
Expand Up @@ -514,15 +514,6 @@ object simple {
def from(bind: LocalV): ArgTerm = ArgTerm(bind, bind.ty, meta = None)
}

@FunctionalInterface
trait TelescopeTermF[Rec <: TermT[Rec], ThisTree <: TelescopeTermC[Rec]] {
def newTelescope(
args: Vector[ArgTermC[Rec]],
implicitly: Boolean,
meta: OptionTermMeta
): ThisTree
}

object TelescopeTerm {
@deprecated("meta")
def from(x: ArgTerm*): TelescopeTerm = TelescopeTerm(x.toVector, meta = None)
Expand Down Expand Up @@ -807,7 +798,7 @@ object simple {
override type ThisTree <: ReferenceCall
}

implicit def LocalVConversion[Rec <: TermT[Rec]](x: UniqidOf[LocalVC[Rec]]): UniqidOf[LocalV] = x.asInstanceOf[UniqidOf[LocalV]]
implicit def LocalVConversion[Term <: TermT[Term]](x: UniqidOf[LocalVC[Term]]): UniqidOf[LocalV] = x.asInstanceOf[UniqidOf[LocalV]]

case class LocalV(
name: Name,
Expand All @@ -825,7 +816,7 @@ object simple {
override def switchUniqId(r: UReplacer): LocalV = copy(uniqId = r(uniqId))
}

implicit def conversionTop[Rec <: TermT[Rec]](x: UniqidOf[ToplevelVC[Rec]]): UniqidOf[ToplevelV] = x.asInstanceOf[UniqidOf[ToplevelV]]
implicit def conversionTop[Term <: TermT[Term]](x: UniqidOf[ToplevelVC[Term]]): UniqidOf[ToplevelV] = x.asInstanceOf[UniqidOf[ToplevelV]]

case class ToplevelV(
id: AbsoluteRef,
Expand Down

0 comments on commit f274832

Please sign in to comment.