Skip to content

Commit

Permalink
compiles legacy code
Browse files Browse the repository at this point in the history
  • Loading branch information
mio-19 committed Oct 24, 2024
1 parent ecf2b5f commit 0cea061
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object Scala {
case class ScalaContext()
def compile(term: core.Term)(implicit ctx: ScalaContext): meta.Tree = term match {
case IntegerTerm(i, _) => Lit.Int(i.toInt)
case _ => throw new NotImplementedError(s"not implemented ${term.getClass.getName} $term")
case _ => throw new NotImplementedError(s"not implemented ${term.getClass.getName} $term")
}

}
2 changes: 1 addition & 1 deletion syntax/src/main/scala/chester/syntax/core/Term.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ case class Annotation(
effects: Option[Term],
meta: OptionTermMeta
) extends Term {
effects.foreach(x=>require(EffectsM.is(x)))
effects.foreach(x => require(EffectsM.is(x)))
override type ThisTree = Annotation
override def descent(f: Term => Term, g: SpecialMap): Annotation = thisOr(
copy(
Expand Down
7 changes: 3 additions & 4 deletions syntax/src/main/scala/chester/syntax/core/orm/OrM.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package chester.syntax.core.orm

import chester.syntax.core.*
import chester.utils.given
import upickle.default.*

import scala.language.implicitConversions
Expand All @@ -14,9 +13,9 @@ type EffectsM = OrM[Effects]

object EffectsM {
def is(x: Any): Boolean = x match {
case Effects(_,_)=>true
case MetaTerm(_,_)=>true
case _ => false
case Effects(_, _) => true
case MetaTerm(_, _) => true
case _ => false
}
}

Expand Down

0 comments on commit 0cea061

Please sign in to comment.