From 0702a1e1d2b52f4068ba2e0dd51a3fd2bb10d59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Brachtha=CC=88user?= Date: Thu, 23 Nov 2023 08:48:10 +0100 Subject: [PATCH] Migrate to Scala 3.3.1 --- build.sbt | 2 +- .../src/main/scala/effekt/Intelligence.scala | 30 +++++++------------ kiama | 2 +- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/build.sbt b/build.sbt index 63c7de0f2..1145309ce 100644 --- a/build.sbt +++ b/build.sbt @@ -19,7 +19,7 @@ lazy val noPublishSettings = Seq( ) lazy val commonSettings = Seq( - scalaVersion := "3.2.0", + scalaVersion := "3.3.1", scalacOptions ++= Seq( "-encoding", "utf8", "-deprecation", diff --git a/effekt/shared/src/main/scala/effekt/Intelligence.scala b/effekt/shared/src/main/scala/effekt/Intelligence.scala index 3cab34681..0891054b0 100644 --- a/effekt/shared/src/main/scala/effekt/Intelligence.scala +++ b/effekt/shared/src/main/scala/effekt/Intelligence.scala @@ -200,15 +200,20 @@ trait Intelligence { SymbolInfo(c, "Resumption", signature, Some(ex)) - case s: VarBinder => + case c: VarBinder => + val signature = C.blockTypeOption(c).map(TState.extractType).orElse(c.tpe).map { tpe => pp"${c.name}: ${tpe}" } val ex = - s"""|Each variable declaration introduces a new scope. + s"""|Like in other languages, mutable variable binders like `${c.name}` + |can be modified (e.g., `${c.name} = VALUE`) by code that has `${c.name}` + |in its lexical scope. | - |Variables must only be accessed while they are still live. - |""".stripMargin + |However, as opposed to other languages, variable binders in Effekt + |are stack allocated and show the right backtracking behavior in + |combination with effect handlers. + """.stripMargin - SymbolInfo(s, "Local variable", None, Some(ex)) + SymbolInfo(c, "Mutable variable binder", signature, Some(ex)) case s: RegBinder => @@ -228,21 +233,6 @@ trait Intelligence { val signature = C.valueTypeOption(c).orElse(c.tpe).map { tpe => pp"${c.name}: ${tpe}" } SymbolInfo(c, "Value binder", signature, None) - case c: VarBinder => - val signature = C.blockTypeOption(c).map(TState.extractType).orElse(c.tpe).map { tpe => pp"${c.name}: ${tpe}" } - - val ex = - s"""|Like in other languages, mutable variable binders like `${c.name}` - |can be modified (e.g., `${c.name} = VALUE`) by code that has `${c.name}` - |in its lexical scope. - | - |However, as opposed to other languages, variable binders in Effekt - |are stack allocated and show the right backtracking behavior in - |combination with effect handlers. - """.stripMargin - - SymbolInfo(c, "Mutable variable binder", signature, Some(ex)) - case c: DefBinder => val signature = C.blockTypeOption(c).orElse(c.tpe).map { tpe => pp"${c.name}: ${tpe}" } SymbolInfo(c, "Block binder", signature, None) diff --git a/kiama b/kiama index 89515c8d1..fd89d5b82 160000 --- a/kiama +++ b/kiama @@ -1 +1 @@ -Subproject commit 89515c8d17c2772d1caba6f1ef7a9ff5d1d93022 +Subproject commit fd89d5b825ff206bdc52e286f0ab24c64ce7fd68