diff --git a/cli/jvm/src/main/scala/chester/repl/JLineTerminal.scala b/cli/jvm/src/main/scala/chester/repl/JLineTerminal.scala index 8f682d078..336e12e63 100644 --- a/cli/jvm/src/main/scala/chester/repl/JLineTerminal.scala +++ b/cli/jvm/src/main/scala/chester/repl/JLineTerminal.scala @@ -54,7 +54,6 @@ class JLineTerminal(init: TerminalInit) { status match { case InputStatus.Complete => - (0 until history.size()).map(history.get(_).toString) result = LineRead(line) continue = false case InputStatus.Incomplete => diff --git a/cli/shared/src/main/scala/chester/cli/CLI.scala b/cli/shared/src/main/scala/chester/cli/CLI.scala index 1f1bc00e9..a33c8403f 100644 --- a/cli/shared/src/main/scala/chester/cli/CLI.scala +++ b/cli/shared/src/main/scala/chester/cli/CLI.scala @@ -138,7 +138,7 @@ class CLI[F[_]](using val source = FilePath(inputFile) - implicit object reporter extends Reporter[Problem] { + object reporter extends Reporter[Problem] { private var varErrors: Boolean = false override def apply(problem: Problem): Unit = problem.severity match { @@ -153,6 +153,7 @@ class CLI[F[_]](using def hasErrors: Boolean = varErrors } + given reportG: reporter.type = reporter for { // Load TASTs from the specified directories diff --git a/parser/src/main/scala/chester/parser/Parser.scala b/parser/src/main/scala/chester/parser/Parser.scala index 6ee5d03c2..69127b030 100644 --- a/parser/src/main/scala/chester/parser/Parser.scala +++ b/parser/src/main/scala/chester/parser/Parser.scala @@ -18,7 +18,7 @@ case class ParserInternal( sourceOffset: SourceOffset, ignoreLocation: Boolean = false, defaultIndexer: Option[StringIndex] = None -)(implicit p: P[?]) { +)(using p: P[?]) { val fileName = sourceOffset.fileName val linesOffset = sourceOffset.linesOffset val posOffset = sourceOffset.posOffset diff --git a/parser/src/main/scala/chester/parser/Parser/pkg.scala b/parser/src/main/scala/chester/parser/Parser/pkg.scala index 375eddd75..434c84882 100644 --- a/parser/src/main/scala/chester/parser/Parser/pkg.scala +++ b/parser/src/main/scala/chester/parser/Parser/pkg.scala @@ -25,7 +25,7 @@ private def parseFromSource[T]( SourceOffset(source), ignoreLocation = ignoreLocation, defaultIndexer = Some(indexer) - )(x) + )(using x) ) ) match { case Parsed.Success(result, _) => Right(result) diff --git a/parser/src/main/scala/chester/parser/ParserEngine.scala b/parser/src/main/scala/chester/parser/ParserEngine.scala index 817c2bbc2..bd4e39ac8 100644 --- a/parser/src/main/scala/chester/parser/ParserEngine.scala +++ b/parser/src/main/scala/chester/parser/ParserEngine.scala @@ -76,7 +76,7 @@ object ParserEngine { linesOffset = linesOffset, posOffset = posOffset ) - )(p).exprEntrance + )(using p).exprEntrance ) match { case Parsed.Success(expr, _) => Right(expr) case f: Parsed.Failure => Left(ParseError(f.msg, Pos.Zero))