Skip to content

Commit e4ae1d2

Browse files
authored
Merge pull request #26 from edin-dal/emilien/scala3
Bump to Scala 3
2 parents 8843c37 + 7cfa00b commit e4ae1d2

File tree

6 files changed

+113
-113
lines changed

6 files changed

+113
-113
lines changed

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
scalaVersion := "2.13.14"
1+
scalaVersion := "3.3.3"
22

33
name := "struct-tensor"
44
organization := "uk.ac.ed.dal"
55
version := "0.1"
66

7-
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
7+
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "2.0.0"
88
libraryDependencies += "com.lihaoyi" %% "fastparse" % "3.0.2"
99
libraryDependencies += "com.github.scopt" %% "scopt" % "4.1.0"
1010
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.11" % Test

src/main/scala/uk/ac/ed/dal/structtensor/Main.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import codegen._
1010
import java.io.File
1111
import scopt.OParser
1212

13-
object Main extends App {
13+
object Main {
14+
def main(args: Array[String]) = {
1415
import Optimizer._
1516
import Utils._
1617

@@ -201,7 +202,7 @@ object Main extends App {
201202
val rcRule = Rule(
202203
ccRule.head,
203204
SoPTimesSoP(
204-
SoP(Seq(Prod(Seq(ccRule.head.vars2RedundancyVars)))),
205+
SoP(Seq(Prod(Seq(ccRule.head.vars2RedundancyVars())))),
205206
rmRule.body
206207
)
207208
)
@@ -331,3 +332,4 @@ object Main extends App {
331332
}
332333
}
333334
}
335+
}

src/main/scala/uk/ac/ed/dal/structtensor/codegen/Codegen.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ object Codegen {
2525
case c: ConstantDouble => c.value.toString
2626
case a @ Arithmetic(op, i1, i2) =>
2727
s"(${CPPFormat(i1)} ${op} ${CPPFormat(i2)})"
28-
case _ => ""
2928
}
3029
case a: Access =>
3130
if (a.vars.isEmpty) CPPFormat(a.name)
@@ -81,7 +80,6 @@ object Codegen {
8180
}
8281
case _ => None
8382
}
84-
case _ => None
8583
}
8684
val (begin, end, equals, usedIndices) = (
8785
begin_end_equals_usedIndices.map(_._1),

0 commit comments

Comments
 (0)