diff --git a/flix.toml b/flix.toml index 07af53f..8c15e52 100644 --- a/flix.toml +++ b/flix.toml @@ -7,4 +7,5 @@ authors = ["Matthew Lutze", "Jonathan Starup"] [dependencies] "github:JonathanStarup/Flix-ANSI-Terminal" = "1.8.0" -"github:mlutze/flix-json" = "0.12.19" +"github:mlutze/flix-json" = "0.13.1" +"github:flix/chalk" = "1.1.0" diff --git a/src/Config.flix b/src/Config.flix index 60ff46c..ba01eda 100644 --- a/src/Config.flix +++ b/src/Config.flix @@ -107,7 +107,7 @@ mod Flixball.Config { } def asArray(path: String, json: JsonElement): Result[String, List[JsonElement]] = match json { - case JsonArray(a) => Ok(a) + case JsonArray(a) => Ok(a |> Vector.toList) case _ => Err("non-array at ${path}") } diff --git a/src/Display.flix b/src/Display.flix index 294f2d1..94e93f0 100644 --- a/src/Display.flix +++ b/src/Display.flix @@ -54,7 +54,7 @@ mod Flixball.Display { def mkIdColorMap(_b: Board): Int32 -> String -> String = // all the ANSI colors - id -> s -> unsafe Environment.handle(match (Int32.modulo(id, 12)) { + id -> s -> unsafe Env.handle(match (Int32.modulo(id, 12)) { case 0 => Chalk.magenta case 1 => Chalk.red case 2 => Chalk.yellow diff --git a/src/Main.flix b/src/Main.flix index ec79520..097867d 100644 --- a/src/Main.flix +++ b/src/Main.flix @@ -18,7 +18,7 @@ mod Flixball.Main { pub def main(): Unit \ IO = { run { - let args = Environment.getArgs(); + let args = Env.getArgs(); match parse(args) { case Action.Version => println(version()) case Action.Help => println(usage()) @@ -30,7 +30,7 @@ mod Flixball.Main { case Action.Replay(_, _) => println("Replay not implemented") case Action.Error => println(usage()) } - } with Environment.runWithIO + } with Env.runWithIO with FileReadWithResult.runWithIO }