We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3b53fc commit 5f93dbaCopy full SHA for 5f93dba
src/main/scala/org/polystat/Python.scala
@@ -13,13 +13,17 @@ object Python:
13
tmp <- cfg.tempDir
14
_ <- readCodeFromInput(".py", cfg.input)
15
.evalMap { case (path, code) =>
16
+ val fileName = path.fileName.toString
17
for
- maybeCode <- IO.blocking(Transpile(path.toString, code))
18
+ maybeCode <- IO(
19
+ Transpile(fileName.splitAt(fileName.indexOf("."))._1, code)
20
+ )
21
_ <- maybeCode match
22
case Some(code) =>
23
writeOutputTo(tmp / path.replaceExt(".eo"))(code)
24
case None => IO.println(s"Couldn't analyze $path...")
25
yield ()
26
+ end for
27
}
28
.compile
29
.drain
0 commit comments