diff --git a/syntax/jvm/src/main/scala/chester/syntax/core/truffle.scala b/syntax/jvm/src/main/scala/chester/syntax/core/truffle.scala index 39ea37c8..c6fa2160 100644 --- a/syntax/jvm/src/main/scala/chester/syntax/core/truffle.scala +++ b/syntax/jvm/src/main/scala/chester/syntax/core/truffle.scala @@ -24,18 +24,18 @@ object truffle { case class CallingArgTerm( @child value: Term, @child ty: Term, - name: Option[Name] = None, - vararg: Boolean = false, - meta: OptionTermMeta + @const name: Option[Name] = None, + @const vararg: Boolean = false, + @const meta: OptionTermMeta ) extends WHNF with CallingArgTermC[Term] derives ReadWriter { override def cons: CallingArgTermF[Term, ThisTree] = this.copy override type ThisTree = CallingArgTerm } case class Calling( - args: Vector[CallingArgTerm], - implicitly: Boolean = false, - meta: OptionTermMeta + @const args: Vector[CallingArgTerm], + @const implicitly: Boolean = false, + @const meta: OptionTermMeta ) extends WHNF with CallingC[Term] derives ReadWriter { override type ThisTree = Calling @@ -43,8 +43,8 @@ object truffle { } case class FCallTerm( @child f: Term, - args: Vector[Calling], - meta: OptionTermMeta + @const args: Vector[Calling], + @const meta: OptionTermMeta ) extends WHNF with FCallTermC[Term] { override type ThisTree = FCallTerm @@ -56,7 +56,7 @@ object truffle { case class Bind( @child bind: LocalV, @child ty: Term, - meta: OptionTermMeta + @const meta: OptionTermMeta ) extends Pat with BindC[Term] { override type ThisTree = Bind @@ -77,10 +77,10 @@ object truffle { sealed trait EffectsM extends Term with EffectsMT[Term] derives ReadWriter { override type ThisTree <: EffectsM } - case class MetaTerm(impl: HoldNotReadable[?], meta: OptionTermMeta) extends Term with MetaTermC[Term] with EffectsM with SpecialTerm { + case class MetaTerm(@const impl: HoldNotReadable[?], @const meta: OptionTermMeta) extends Term with MetaTermC[Term] with EffectsM with SpecialTerm { override type ThisTree = MetaTerm } - case class ListTerm(@child terms: Vector[Term], meta: OptionTermMeta) extends Term with ListTermC[Term] with WHNF derives ReadWriter { + case class ListTerm(@child terms: Vector[Term], @const meta: OptionTermMeta) extends Term with ListTermC[Term] with WHNF derives ReadWriter { override final type ThisTree = ListTerm override def cons: ListTermF[Term, ThisTree] = this.copy } @@ -92,11 +92,11 @@ object truffle { def level: Term } given aTypeF: TypeF[Term, Type] = Type(Level0, meta = None).cons - case class Type(@child level: Term, meta: OptionTermMeta) extends Sort with TypeC[Term] { + case class Type(@child level: Term, @const meta: OptionTermMeta) extends Sort with TypeC[Term] { override type ThisTree = Type override def cons: TypeF[Term, ThisTree] = this.copy } - case class LevelType(meta: OptionTermMeta) extends TypeTerm with LevelTypeC[Term] { + case class LevelType(@const meta: OptionTermMeta) extends TypeTerm with LevelTypeC[Term] { override type ThisTree = LevelType override def cons: LevelTypeF[Term, ThisTree] = this.copy } @@ -104,20 +104,20 @@ object truffle { type ThisTree <: Level } given aLevelFiniteF: LevelFiniteF[Term, LevelFinite] = LevelFinite(IntegerTerm(0, meta = None), meta = None).cons - case class LevelFinite(@child n: Term, meta: OptionTermMeta) extends Level with LevelFiniteC[Term] { + case class LevelFinite(@child n: Term, @const meta: OptionTermMeta) extends Level with LevelFiniteC[Term] { override type ThisTree = LevelFinite override def cons: LevelFiniteF[Term, ThisTree] = this.copy } - case class LevelUnrestricted(meta: OptionTermMeta) extends Level with LevelUnrestrictedC[Term] { + case class LevelUnrestricted(@const meta: OptionTermMeta) extends Level with LevelUnrestrictedC[Term] { override type ThisTree = LevelUnrestricted override def cons: LevelUnrestrictedF[Term, ThisTree] = this.copy } - case class Prop(@child level: Term, meta: OptionTermMeta) extends Sort with PropC[Term] { + case class Prop(@child level: Term,@const meta: OptionTermMeta) extends Sort with PropC[Term] { override type ThisTree = Prop override def cons: PropF[Term, ThisTree] = this.copy } // fibrant types - case class FType(@child level: Term, meta: OptionTermMeta) extends Sort with FTypeC[Term] { + case class FType(@child level: Term,@const meta: OptionTermMeta) extends Sort with FTypeC[Term] { override type ThisTree = FType override def cons: FTypeF[Term, ThisTree] = this.copy } @@ -127,82 +127,82 @@ object truffle { sealed trait AbstractIntTerm extends LiteralTerm with AbstractIntTermT[Term] derives ReadWriter { override type ThisTree <: AbstractIntTerm } - case class IntTerm(value: Int, meta: OptionTermMeta) extends LiteralTerm with AbstractIntTerm with IntTermC[Term] derives ReadWriter { + case class IntTerm(@const value: Int, @const meta: OptionTermMeta) extends LiteralTerm with AbstractIntTerm with IntTermC[Term] derives ReadWriter { override type ThisTree = IntTerm override def cons: IntTermF[Term, ThisTree] = this.copy } given aIntegerTerm: IntegerTermF[Term, IntegerTerm] = IntegerTerm(0, meta = None).cons - case class IntegerTerm(value: BigInt, meta: OptionTermMeta) extends LiteralTerm with AbstractIntTerm with IntegerTermC[Term] derives ReadWriter { + case class IntegerTerm(@const value: BigInt, @const meta: OptionTermMeta) extends LiteralTerm with AbstractIntTerm with IntegerTermC[Term] derives ReadWriter { override type ThisTree = IntegerTerm override def cons: IntegerTermF[Term, ThisTree] = this.copy } - case class IntegerType(meta: OptionTermMeta) extends TypeTerm with IntegerTypeC[Term] derives ReadWriter { + case class IntegerType(@const meta: OptionTermMeta) extends TypeTerm with IntegerTypeC[Term] derives ReadWriter { override type ThisTree = IntegerType override def cons: IntegerTypeF[Term, ThisTree] = this.copy } // int of 64 bits or more - case class IntType(meta: OptionTermMeta) extends TypeTerm with IntTypeC[Term] derives ReadWriter { + case class IntType(@const meta: OptionTermMeta) extends TypeTerm with IntTypeC[Term] derives ReadWriter { override type ThisTree = IntType override def cons: IntTypeF[Term, ThisTree] = this.copy } // unsigned int of 64 bits or more - case class UIntType(meta: OptionTermMeta) extends TypeTerm with UIntTypeC[Term] derives ReadWriter { + case class UIntType(@const meta: OptionTermMeta) extends TypeTerm with UIntTypeC[Term] derives ReadWriter { override type ThisTree = UIntType override def cons: UIntTypeF[Term, ThisTree] = this.copy } - case class NaturalType(meta: OptionTermMeta) extends TypeTerm with NaturalTypeC[Term] derives ReadWriter { + case class NaturalType(@const meta: OptionTermMeta) extends TypeTerm with NaturalTypeC[Term] derives ReadWriter { override type ThisTree = NaturalType override def cons: NaturalTypeF[Term, ThisTree] = this.copy } - case class RationalTerm(value: Rational, meta: OptionTermMeta) extends LiteralTerm with RationalTermC[Term] derives ReadWriter { + case class RationalTerm(@const value: Rational, @const meta: OptionTermMeta) extends LiteralTerm with RationalTermC[Term] derives ReadWriter { override type ThisTree = RationalTerm override def cons: RationalTermF[Term, ThisTree] = this.copy } - case class BooleanTerm(value: Boolean, meta: OptionTermMeta) extends LiteralTerm with BooleanTermC[Term] derives ReadWriter { + case class BooleanTerm(@const value: Boolean, @const meta: OptionTermMeta) extends LiteralTerm with BooleanTermC[Term] derives ReadWriter { override type ThisTree = BooleanTerm override def cons: BooleanTermF[Term, ThisTree] = this.copy } - case class BooleanType(meta: OptionTermMeta) extends TypeTerm with BooleanTypeC[Term] derives ReadWriter { + case class BooleanType(@const meta: OptionTermMeta) extends TypeTerm with BooleanTypeC[Term] derives ReadWriter { override type ThisTree = BooleanType override def cons: BooleanTypeF[Term, ThisTree] = this.copy } - case class StringTerm(value: String, meta: OptionTermMeta) extends LiteralTerm with StringTermC[Term] derives ReadWriter { + case class StringTerm(@const value: String, @const meta: OptionTermMeta) extends LiteralTerm with StringTermC[Term] derives ReadWriter { override type ThisTree = StringTerm override def cons: StringTermF[Term, ThisTree] = this.copy } - case class SymbolTerm(value: String, meta: OptionTermMeta) extends LiteralTerm with SymbolTermC[Term] derives ReadWriter { + case class SymbolTerm(@const value: String, @const meta: OptionTermMeta) extends LiteralTerm with SymbolTermC[Term] derives ReadWriter { override type ThisTree = SymbolTerm override def cons: SymbolTermF[Term, ThisTree] = this.copy } - case class RationalType(meta: OptionTermMeta) extends TypeTerm with RationalTypeC[Term] derives ReadWriter { + case class RationalType(@const meta: OptionTermMeta) extends TypeTerm with RationalTypeC[Term] derives ReadWriter { override type ThisTree = RationalType override def cons: RationalTypeF[Term, ThisTree] = this.copy } // float of 32 bits or more - case class FloatType(meta: OptionTermMeta) extends TypeTerm with FloatTypeC[Term] derives ReadWriter { + case class FloatType(@const meta: OptionTermMeta) extends TypeTerm with FloatTypeC[Term] derives ReadWriter { override type ThisTree = FloatType override def cons: FloatTypeF[Term, ThisTree] = this.copy } - case class StringType(meta: OptionTermMeta) extends TypeTerm with StringTypeC[Term] derives ReadWriter { + case class StringType(@const meta: OptionTermMeta) extends TypeTerm with StringTypeC[Term] derives ReadWriter { override type ThisTree = StringType override def cons: StringTypeF[Term, ThisTree] = this.copy } - case class SymbolType(meta: OptionTermMeta) extends TypeTerm with SymbolTypeC[Term] derives ReadWriter { + case class SymbolType(@const meta: OptionTermMeta) extends TypeTerm with SymbolTypeC[Term] derives ReadWriter { override type ThisTree = SymbolType override def cons: SymbolTypeF[Term, ThisTree] = this.copy } - case class AnyType(@child level: Term, meta: OptionTermMeta) extends TypeTerm with AnyTypeC[Term] derives ReadWriter { + case class AnyType(@child level: Term, @const meta: OptionTermMeta) extends TypeTerm with AnyTypeC[Term] derives ReadWriter { override type ThisTree = AnyType override def cons: AnyTypeF[Term, ThisTree] = this.copy } given aAnyTypeF: AnyTypeF[Term, AnyType] = AnyType(Level0, meta = None).cons - case class NothingType(meta: OptionTermMeta) extends TypeTerm with NothingTypeC[Term] { + case class NothingType(@const meta: OptionTermMeta) extends TypeTerm with NothingTypeC[Term] { override type ThisTree = NothingType override def cons: NothingTypeF[Term, ThisTree] = this.copy } case class LiteralType( @child literal: LiteralTerm, - meta: OptionTermMeta + @const meta: OptionTermMeta ) extends TypeTerm with LiteralTypeC[Term] { override type ThisTree = LiteralType @@ -211,18 +211,18 @@ object truffle { case class ArgTerm( @child bind: LocalV, @child ty: Term, - default: Option[Term] = None, - vararg: Boolean = false, - meta: OptionTermMeta + @const default: Option[Term] = None, + @const vararg: Boolean = false, + @const meta: OptionTermMeta ) extends WHNF with ArgTermC[Term] { override type ThisTree = ArgTerm override def cons: ArgTermF[Term, ThisTree] = this.copy } case class TelescopeTerm( - args: Vector[ArgTerm], - implicitly: Boolean = false, - meta: OptionTermMeta + @const args: Vector[ArgTerm], + @const implicitly: Boolean = false, + @const meta: OptionTermMeta ) extends WHNF with TelescopeTermC[Term] { override type ThisTree = TelescopeTerm @@ -231,17 +231,17 @@ object truffle { case class Function( @child ty: FunctionType, @child body: Term, - meta: OptionTermMeta + @const meta: OptionTermMeta ) extends WHNF with FunctionC[Term] { override type ThisTree = Function override def cons: FunctionF[Term, ThisTree] = this.copy } case class FunctionType( - telescope: Vector[TelescopeTerm], + @const telescope: Vector[TelescopeTerm], @child resultTy: Term, - effects: EffectsM = NoEffect, - meta: OptionTermMeta + @const effects: EffectsM = NoEffect, + @const meta: OptionTermMeta ) extends WHNF with FunctionTypeC[Term] { override type ThisTree = FunctionType @@ -250,45 +250,45 @@ object truffle { case class ObjectClauseValueTerm( @child key: Term, @child value: Term, - meta: OptionTermMeta + @const meta: OptionTermMeta ) extends WHNF with ObjectClauseValueTermC[Term] derives ReadWriter { override type ThisTree = ObjectClauseValueTerm override def cons: ObjectClauseValueTermF[Term, ThisTree] = this.copy } case class ObjectTerm( - clauses: Vector[ObjectClauseValueTerm], - meta: OptionTermMeta + @const clauses: Vector[ObjectClauseValueTerm], + @const meta: OptionTermMeta ) extends WHNF with ObjectTermC[Term] { override type ThisTree = ObjectTerm override def cons: ObjectTermF[Term, ThisTree] = this.copy } case class ObjectType( - fieldTypes: Vector[ObjectClauseValueTerm], - exactFields: Boolean = false, - meta: OptionTermMeta + @const fieldTypes: Vector[ObjectClauseValueTerm], + @const exactFields: Boolean = false, + @const meta: OptionTermMeta ) extends WHNF with ObjectTypeC[Term] { override type ThisTree = ObjectType override def cons: ObjectTypeF[Term, ThisTree] = this.copy } - case class ListF(meta: OptionTermMeta) extends Builtin with ListFC[Term] { + case class ListF(@const meta: OptionTermMeta) extends Builtin with ListFC[Term] { override type ThisTree = ListF override def cons: ListFF[Term, ThisTree] = this.copy } sealed trait Constructed extends WHNF with ConstructedT[Term] derives ReadWriter { type ThisTree <: Constructed } - case class ListType(@child ty: Term, meta: OptionTermMeta) extends Constructed with ListTypeC[Term] with TypeTerm { + case class ListType(@child ty: Term, @const meta: OptionTermMeta) extends Constructed with ListTypeC[Term] with TypeTerm { override type ThisTree = ListType override def cons: ListTypeF[Term, ThisTree] = this.copy } - case class Union(xs: NonEmptyVector[Term], meta: OptionTermMeta) extends TypeTerm with UnionC[Term] { + case class Union(@const xs: NonEmptyVector[Term], @const meta: OptionTermMeta) extends TypeTerm with UnionC[Term] { override type ThisTree = Union override def cons: UnionF[Term, ThisTree] = this.copy } - case class Intersection(xs: NonEmptyVector[Term], meta: OptionTermMeta) extends TypeTerm with IntersectionC[Term] derives ReadWriter { + case class Intersection(@const xs: NonEmptyVector[Term], @const meta: OptionTermMeta) extends TypeTerm with IntersectionC[Term] derives ReadWriter { override type ThisTree = Intersection override def cons: IntersectionF[Term, ThisTree] = this.copy } @@ -298,13 +298,13 @@ object truffle { sealed trait Effect extends WHNF with EffectT[Term] derives ReadWriter { override type ThisTree <: Effect } - case class Effects(effectss: Map[LocalV, Term] = HashMap.empty, meta: OptionTermMeta) extends WHNF with EffectsM with EffectsC[Term] + case class Effects(@const effectss: Map[LocalV, Term] = HashMap.empty, @const meta: OptionTermMeta) extends WHNF with EffectsM with EffectsC[Term] derives ReadWriter { override def effects = effectss override type ThisTree = Effects override def cons: EffectsF[Term, ThisTree] = this.copy } - case class ExceptionEffect(meta: OptionTermMeta) extends Effect with ExceptionEffectC[Term] { + case class ExceptionEffect(@const meta: OptionTermMeta) extends Effect with ExceptionEffectC[Term] { override type ThisTree = ExceptionEffect override def cons: ExceptionEffectF[Term, ThisTree] = this.copy } @@ -312,36 +312,36 @@ object truffle { override type ThisTree <: ReferenceCall } case class LocalV( - name: Name, + @const name: Name, @child ty: Term, - uniqId: UniqidOf[LocalV], - meta: OptionTermMeta + @const uniqId: UniqidOf[LocalV], + @const meta: OptionTermMeta ) extends ReferenceCall with LocalVC[Term] { override type ThisTree = LocalV override def cons: LocalVF[Term, ThisTree] = this.copy } case class ToplevelV( - id: AbsoluteRef, + @const id: AbsoluteRef, @child ty: Term, - uniqId: UniqidOf[ToplevelV], - meta: OptionTermMeta + @const uniqId: UniqidOf[ToplevelV], + @const meta: OptionTermMeta ) extends ReferenceCall with ToplevelVC[Term] { override type ThisTree = ToplevelV override def cons: ToplevelVF[Term, ThisTree] = this.copy } - case class ErrorTerm(problem: Problem, meta: OptionTermMeta) extends SpecialTerm with ErrorTermC[Term] { + case class ErrorTerm(@const problem: Problem, @const meta: OptionTermMeta) extends SpecialTerm with ErrorTermC[Term] { override type ThisTree = ErrorTerm } sealed trait StmtTerm extends Term with StmtTermT[Term] derives ReadWriter { override type ThisTree <: StmtTerm } case class LetStmtTerm( - localv: LocalV, + @child localv: LocalV, @child value: Term, @child ty: Term, - meta: OptionTermMeta + @const meta: OptionTermMeta ) extends StmtTerm with LetStmtTermC[Term] { override type ThisTree = LetStmtTerm @@ -351,7 +351,7 @@ object truffle { @child localv: LocalV, @child value: Term, @child ty: Term, - meta: OptionTermMeta + @const meta: OptionTermMeta ) extends StmtTerm with DefStmtTermC[Term] { override type ThisTree = DefStmtTerm @@ -360,28 +360,28 @@ object truffle { case class ExprStmtTerm( @child expr: Term, @child ty: Term = AnyType0, - meta: OptionTermMeta + @const meta: OptionTermMeta ) extends StmtTerm with ExprStmtTermC[Term] { override type ThisTree = ExprStmtTerm override def cons: ExprStmtTermF[Term, ThisTree] = this.copy } - case class NonlocalOrLocalReturn(@child value: Term, meta: OptionTermMeta) extends StmtTerm with NonlocalOrLocalReturnC[Term] { + case class NonlocalOrLocalReturn(@child value: Term, @const meta: OptionTermMeta) extends StmtTerm with NonlocalOrLocalReturnC[Term] { override type ThisTree = NonlocalOrLocalReturn override def cons: NonlocalOrLocalReturnF[Term, ThisTree] = this.copy } - case class TupleType(types: Vector[Term], meta: OptionTermMeta) extends TypeTerm with TupleTypeC[Term] { + case class TupleType(@const types: Vector[Term], @const meta: OptionTermMeta) extends TypeTerm with TupleTypeC[Term] { override type ThisTree = TupleType override def cons: TupleTypeF[Term, ThisTree] = this.copy } - case class TupleTerm(values: Vector[Term], meta: OptionTermMeta) extends WHNF with TupleTermC[Term] { + case class TupleTerm(@const values: Vector[Term], @const meta: OptionTermMeta) extends WHNF with TupleTermC[Term] { override type ThisTree = TupleTerm override def cons: TupleTermF[Term, ThisTree] = this.copy } case class BlockTerm( - statements: Vector[StmtTerm], + @const statements: Vector[StmtTerm], @child result: Term, - meta: OptionTermMeta + @const meta: OptionTermMeta ) extends Uneval with BlockTermC[Term] derives ReadWriter { override type ThisTree = BlockTerm @@ -389,68 +389,68 @@ object truffle { } case class Annotation( @child term: Term, - ty: Option[Term], - effects: Option[EffectsM], - meta: OptionTermMeta + @const ty: Option[Term], + @const effects: Option[EffectsM], + @const meta: OptionTermMeta ) extends Uneval with AnnotationC[Term] { override type ThisTree = Annotation override def cons: AnnotationF[Term, ThisTree] = this.copy } case class FieldTerm( - name: Name, + @const name: Name, @child ty: Term, - meta: OptionTermMeta + @const meta: OptionTermMeta ) extends WHNF with FieldTermC[Term] derives ReadWriter { override type ThisTree = FieldTerm override def cons: FieldTermF[Term, ThisTree] = this.copy } case class RecordStmtTerm( - name: Name, - uniqId: UniqidOf[RecordStmtTerm] = Uniqid.generate[RecordStmtTerm], - fields: Vector[FieldTerm], - body: Option[BlockTerm], - meta: OptionTermMeta + @const name: Name, + @const uniqId: UniqidOf[RecordStmtTerm] = Uniqid.generate[RecordStmtTerm], + @const fields: Vector[FieldTerm], + @const body: Option[BlockTerm], + @const meta: OptionTermMeta ) extends TypeDefinition with RecordStmtTermC[Term] { override type ThisTree = RecordStmtTerm override def cons: RecordStmtTermF[Term, ThisTree] = this.copy } case class RecordConstructorCallTerm( - recordName: Name, - args: Vector[Term], - meta: OptionTermMeta + @const recordName: Name, + @const args: Vector[Term], + @const meta: OptionTermMeta ) extends Uneval with RecordConstructorCallTermC[Term] { override type ThisTree = RecordConstructorCallTerm override def cons: RecordConstructorCallTermF[Term, ThisTree] = this.copy } case class TraitStmtTerm( - name: Name, - uniqId: UniqidOf[TraitStmtTerm] = Uniqid.generate[TraitStmtTerm], - extendsClause: Option[Term] = None, - body: Option[BlockTerm] = None, - meta: OptionTermMeta + @const name: Name, + @const uniqId: UniqidOf[TraitStmtTerm] = Uniqid.generate[TraitStmtTerm], + @const extendsClause: Option[Term] = None, + @const body: Option[BlockTerm] = None, + @const meta: OptionTermMeta ) extends TypeDefinition with TraitStmtTermC[Term] derives ReadWriter { override type ThisTree = TraitStmtTerm override def cons: TraitStmtTermF[Term, ThisTree] = this.copy } case class InterfaceStmtTerm( - name: Name, - uniqId: UniqidOf[InterfaceStmtTerm] = Uniqid.generate[InterfaceStmtTerm], - extendsClause: Option[Term] = None, - body: Option[BlockTerm] = None, - meta: OptionTermMeta + @const name: Name, + @const uniqId: UniqidOf[InterfaceStmtTerm] = Uniqid.generate[InterfaceStmtTerm], + @const extendsClause: Option[Term] = None, + @const body: Option[BlockTerm] = None, + @const meta: OptionTermMeta ) extends TypeDefinition with InterfaceStmtTermC[Term] derives ReadWriter { override type ThisTree = InterfaceStmtTerm override def cons: InterfaceStmtTermF[Term, ThisTree] = this.copy } case class ObjectCallTerm( - objectRef: Term, - meta: OptionTermMeta + @child objectRef: Term, + @const meta: OptionTermMeta ) extends Uneval with ObjectCallTermC[Term] { override type ThisTree = ObjectCallTerm @@ -458,18 +458,18 @@ object truffle { } case class ObjectTypeTerm( @child objectDef: ObjectStmtTerm, - meta: OptionTermMeta + @const meta: OptionTermMeta ) extends TypeTerm with ObjectTypeTermC[Term] { override type ThisTree = ObjectTypeTerm override def cons: ObjectTypeTermF[Term, ThisTree] = this.copy } case class ObjectStmtTerm( - name: Name, - uniqId: UniqidOf[ObjectStmtTerm], - extendsClause: Option[Term], - body: Option[BlockTerm], - meta: OptionTermMeta + @const name: Name, + @const uniqId: UniqidOf[ObjectStmtTerm], + @const extendsClause: Option[Term], + @const body: Option[BlockTerm], + @const meta: OptionTermMeta ) extends TypeDefinition with ObjectStmtTermC[Term] derives ReadWriter { override type ThisTree = ObjectStmtTerm diff --git a/syntax/jvm/src/main/scala/chester/syntax/core/truffleutils.scala b/syntax/jvm/src/main/scala/chester/syntax/core/truffleutils.scala index 3021f340..5bb4ada2 100644 --- a/syntax/jvm/src/main/scala/chester/syntax/core/truffleutils.scala +++ b/syntax/jvm/src/main/scala/chester/syntax/core/truffleutils.scala @@ -1,5 +1,6 @@ package chester.syntax.core +import com.oracle.truffle.api.CompilerDirectives.CompilationFinal import com.oracle.truffle.api.nodes.Node.Child import scala.annotation.meta.field @@ -10,3 +11,5 @@ import scala.annotation.meta.field // This is necessary to make sure the *field* is annotated, not the getters // or setters. type child = Child @field + +type const = CompilationFinal @field \ No newline at end of file