Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync configs #404

Merged
merged 12 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: erlef/setup-beam@a34c98fd51e370b4d4981854aba1eb817ce4e483
with:
otp-version: "25.2"
gleam-version: "0.32.2"
gleam-version: "0.34.0"
elixir-version: "1.15.0"

- name: Run tests for all exercises
Expand Down
1 change: 0 additions & 1 deletion .tool-versions

This file was deleted.

60 changes: 35 additions & 25 deletions exercise_generator/src/exercise_generator.gleam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import gleam/io
import gleam/map.{type Map}
import gleam/dict.{type Dict}
import gleam/function
import gleam/list
import gleam/int
Expand Down Expand Up @@ -28,7 +28,7 @@ type TestData {
reimplements: Result(String, Nil),
description: String,
function: String,
input: Map(String, JsonData),
input: Dict(String, JsonData),
expected: JsonData,
)
}
Expand All @@ -54,7 +54,7 @@ type JsonData {
JsonFloat(Float)
JsonString(String)
JsonList(List(JsonData))
JsonObject(Map(String, JsonData))
JsonObject(Dict(String, JsonData))
}

fn json_data_to_gleam_type(data: JsonData) -> String {
Expand Down Expand Up @@ -83,7 +83,7 @@ fn json_data_to_gleam_value(data: JsonData) -> String {
JsonObject(map) -> {
let args =
map
|> map.to_list
|> dict.to_list
|> list.map(fn(arg) {
clean_variable(arg.0) <> ": " <> json_data_to_gleam_value(arg.1)
})
Expand All @@ -105,11 +105,11 @@ fn have_same_type(a: JsonData, b: JsonData) -> Bool {
JsonObject(x), JsonObject(y) -> {
let x: List(#(String, JsonData)) =
x
|> map.to_list
|> dict.to_list
|> list.sort(fn(a, b) { string.compare(a.0, b.0) })
let y: List(#(String, JsonData)) =
y
|> map.to_list
|> dict.to_list
|> list.sort(fn(a, b) { string.compare(a.0, b.0) })
let comparaison =
list.strict_zip(x, y)
Expand Down Expand Up @@ -181,7 +181,7 @@ fn write_solution_files(

let content =
functions
|> map.to_list
|> dict.to_list
|> list.sort(by: fn(a, b) { int.compare({ a.1 }.order, { b.1 }.order) })
|> list.map(fn(item) {
let #(name, Function(arguments, return_type, can_error, need_labels, _)) =
Expand Down Expand Up @@ -215,7 +215,13 @@ fn write_solution_files(
})
|> string.join(", ")

"pub fn " <> clean_variable(name) <> "(" <> args <> ") -> " <> return <> " {\n todo \n}"
"pub fn "
<> clean_variable(name)
<> "("
<> args
<> ") -> "
<> return
<> " {\n todo \n}"
})
|> string.join("\n")

Expand All @@ -237,14 +243,16 @@ fn write_solution_files(
let assert Ok(Nil) = file.write(content, example_path)
}

fn functions_to_implement(test_cases: List(TestCase)) -> Map(String, Function) {
list.fold(over: test_cases, from: map.new(), with: check_test_case)
fn functions_to_implement(
test_cases: List(TestCase),
) -> Dict(String, Function) {
list.fold(over: test_cases, from: dict.new(), with: check_test_case)
}

fn check_test_case(
functions: Map(String, Function),
functions: Dict(String, Function),
test_case: TestCase,
) -> Map(String, Function) {
) -> Dict(String, Function) {
case test_case {
TestGroup(cases: cases, ..) ->
list.fold(over: cases, from: functions, with: check_test_case)
Expand All @@ -255,13 +263,13 @@ fn check_test_case(
..,
)) -> {
let can_error = case expected {
JsonObject(object) -> map.has_key(object, "error")
JsonObject(object) -> dict.has_key(object, "error")
_ -> False
}

let args =
input
|> map.to_list
|> dict.to_list
|> list.map(fn(arg) { Argument(arg.0, arg.1) })

let need_labels = case args {
Expand All @@ -272,7 +280,7 @@ fn check_test_case(
_ -> True
}

let current_function = case map.get(functions, function) {
let current_function = case dict.get(functions, function) {
Ok(func) -> {
let func =
Function(..func, need_labels: func.need_labels || need_labels)
Expand All @@ -284,10 +292,10 @@ fn check_test_case(
}

Error(Nil) ->
Function(args, expected, can_error, need_labels, map.size(functions))
Function(args, expected, can_error, need_labels, dict.size(functions))
}

map.insert(functions, function, current_function)
dict.insert(functions, function, current_function)
}
}
}
Expand Down Expand Up @@ -334,7 +342,7 @@ fn print_comments(comments: List(String)) -> String {
fn print_tests(
slug: String,
prefix: String,
functions: Map(String, Function),
functions: Dict(String, Function),
tests: List(TestCase),
) -> String {
tests
Expand All @@ -345,7 +353,7 @@ fn print_tests(
fn print_test(
slug: String,
prefix: String,
functions: Map(String, Function),
functions: Dict(String, Function),
test: TestCase,
) -> String {
case test {
Expand All @@ -368,18 +376,20 @@ fn print_test(
[
"This test reimplements the test with uuid " <> uuid,
"Please identify that test and remove it. Link:",
"https://github.com/exercism/problem-specifications/blob/main/exercises/" <> slug <> "/canonical-data.json",
"https://github.com/exercism/problem-specifications/blob/main/exercises/"
<> slug
<> "/canonical-data.json",
]
|> list.append(comments)
|> print_comments()
_ -> print_comments(comments)
}
let test_name = flatten_description(prefix <> description)
let assert Ok(Function(need_labels: need_labels, ..)) =
map.get(functions, function)
dict.get(functions, function)
let input =
input
|> map.to_list
|> dict.to_list
|> list.map(fn(item) {
case need_labels {
True ->
Expand Down Expand Up @@ -424,14 +434,14 @@ fn flatten_description(description: String) -> String {

fn get_expected_value(
function: String,
functions: Map(String, Function),
functions: Dict(String, Function),
expected: JsonData,
) {
case map.get(functions, function) {
case dict.get(functions, function) {
Ok(Function(can_error: True, ..)) ->
case expected {
JsonObject(map) ->
case map.get(map, "error") {
case dict.get(map, "error") {
Ok(value) -> "Error(" <> json_data_to_gleam_value(value) <> ")"
Error(Nil) -> "Ok(" <> json_data_to_gleam_value(expected) <> ")"
}
Expand Down
1 change: 0 additions & 1 deletion exercises/concept/bandwagoner/.meta/example.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ pub fn root_for_team(team: Team) -> Bool {
Team(coach: Coach(former_player: True, ..), ..) -> True
Team(stats: Stats(wins: wins, losses: losses), ..) ->
losses > wins || wins >= 60
_ -> False
}
}
6 changes: 3 additions & 3 deletions exercises/concept/bandwagoner/gleam.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ version = "0.1.0"

[dependencies]
gleam_bitwise = "~> 1.2"
gleam_otp = "~> 0.7"
gleam_stdlib = "~> 0.32"
simplifile = "~> 0.1"
gleam_otp = "~> 0.7 or ~> 1.0"
gleam_stdlib = "~> 0.32 or ~> 1.0"
simplifile = "~> 1.0"

[dev-dependencies]
exercism_test_runner = "~> 1.4"
27 changes: 14 additions & 13 deletions exercises/concept/bandwagoner/manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@
# You typically do not need to edit this file

packages = [
{ name = "exercism_test_runner", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_stdlib", "glance", "gap", "simplifile", "gleam_erlang", "gleam_json"], otp_app = "exercism_test_runner", source = "hex", outer_checksum = "265A7F6E032F1B4035E322EAE1AAB8325BC69177C5E57B5C758231471E511A54" },
{ name = "gap", version = "1.0.1", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_stdlib"], otp_app = "gap", source = "hex", outer_checksum = "5E369751DB547BFBDA7735878DC04DA31FCA3112193D61D5D7566010C7C8BA98" },
{ name = "glance", version = "0.8.0", build_tools = ["gleam"], requirements = ["glexer", "gleam_stdlib"], otp_app = "glance", source = "hex", outer_checksum = "C78390EAF236A74CE7E8FD7AB07D1D1A494E6C82415B33BA6BB6923275B9FE3B" },
{ name = "argv", version = "1.0.1", build_tools = ["gleam"], requirements = [], otp_app = "argv", source = "hex", outer_checksum = "A6E9009E50BBE863EB37D963E4315398D41A3D87D0075480FC244125808F964A" },
{ name = "exercism_test_runner", version = "1.7.0", build_tools = ["gleam"], requirements = ["simplifile", "argv", "gleam_erlang", "gap", "glance", "gleam_stdlib", "gleam_community_ansi", "gleam_json"], otp_app = "exercism_test_runner", source = "hex", outer_checksum = "2FC1BADB19BEC2AE77BFD2D3A606A014C85412A7B874CAFC4BA8CF04B0B257CD" },
{ name = "gap", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_stdlib"], otp_app = "gap", source = "hex", outer_checksum = "2EE1B0A17E85CF73A0C1D29DA315A2699117A8F549C8E8D89FA8261BE41EDEB1" },
{ name = "glance", version = "0.8.1", build_tools = ["gleam"], requirements = ["gleam_stdlib", "glexer"], otp_app = "glance", source = "hex", outer_checksum = "C486C920E1865F66A404AAB9A762C4226D95B60AC2C733D175B28C3F0920CE21" },
{ name = "gleam_bitwise", version = "1.3.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_bitwise", source = "hex", outer_checksum = "B36E1D3188D7F594C7FD4F43D0D2CE17561DE896202017548578B16FE1FE9EFC" },
{ name = "gleam_community_ansi", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_community_colour", "gleam_stdlib"], otp_app = "gleam_community_ansi", source = "hex", outer_checksum = "8B5A9677BC5A2738712BBAF2BA289B1D8195FDF962BBC769569976AD5E9794E1" },
{ name = "gleam_community_colour", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_community_colour", source = "hex", outer_checksum = "036C206886AFB9F153C552700A7A0B4D2864E3BC96A20C77E5F34A013C051BE3" },
{ name = "gleam_erlang", version = "0.23.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "C21CFB816C114784E669FFF4BBF433535EEA9960FA2F216209B8691E87156B96" },
{ name = "gleam_json", version = "0.7.0", build_tools = ["gleam"], requirements = ["thoas", "gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "CB405BD93A8828BCD870463DE29375E7B2D252D9D124C109E5B618AAC00B86FC" },
{ name = "gleam_otp", version = "0.8.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_erlang"], otp_app = "gleam_otp", source = "hex", outer_checksum = "18EF8242A5E54BA92F717C7222F03B3228AEE00D1F286D4C56C3E8C18AA2588E" },
{ name = "gleam_stdlib", version = "0.32.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "ABF00CDCCB66FABBCE351A50060964C4ACE798F95A0D78622C8A7DC838792577" },
{ name = "gleam_community_ansi", version = "1.4.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_community_colour"], otp_app = "gleam_community_ansi", source = "hex", outer_checksum = "FE79E08BF97009729259B6357EC058315B6FBB916FAD1C2FF9355115FEB0D3A4" },
{ name = "gleam_community_colour", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_community_colour", source = "hex", outer_checksum = "A49A5E3AE8B637A5ACBA80ECB9B1AFE89FD3D5351FF6410A42B84F666D40D7D5" },
{ name = "gleam_erlang", version = "0.24.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "26BDB52E61889F56A291CB34167315780EE4AA20961917314446542C90D1C1A0" },
{ name = "gleam_json", version = "1.0.0", build_tools = ["gleam"], requirements = ["thoas", "gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "8B197DD5D578EA6AC2C0D4BDC634C71A5BCA8E7DB5F47091C263ECB411A60DF3" },
{ name = "gleam_otp", version = "0.9.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "5FADBBEC5ECF3F8B6BE91101D432758503192AE2ADBAD5602158977341489F71" },
{ name = "gleam_stdlib", version = "0.34.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "1FB8454D2991E9B4C0C804544D8A9AD0F6184725E20D63C3155F0AEB4230B016" },
{ name = "glexer", version = "0.7.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glexer", source = "hex", outer_checksum = "4484942A465482A0A100936E1E5F12314DB4B5AC0D87575A7B9E9062090B96BE" },
{ name = "simplifile", version = "0.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "45E2C6C7FD8D931A660CA56880EC75186BB39C84F36951B4EE284F6F95E8F65D" },
{ name = "simplifile", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "359CD7006E2F69255025C858CCC6407C11A876EC179E6ED1E46809E8DC6B1AAD" },
{ name = "thoas", version = "0.4.1", build_tools = ["rebar3"], requirements = [], otp_app = "thoas", source = "hex", outer_checksum = "4918D50026C073C4AB1388437132C77A6F6F7C8AC43C60C13758CC0ADCE2134E" },
]

[requirements]
exercism_test_runner = { version = "~> 1.4" }
gleam_bitwise = { version = "~> 1.2" }
gleam_otp = { version = "~> 0.7" }
gleam_stdlib = { version = "~> 0.32" }
simplifile = { version = "~> 0.1" }
gleam_otp = { version = "~> 0.7 or ~> 1.0" }
gleam_stdlib = { version = "~> 0.32 or ~> 1.0" }
simplifile = { version = "~> 1.0" }
6 changes: 3 additions & 3 deletions exercises/concept/bettys-bike-shop/gleam.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ version = "0.1.0"

[dependencies]
gleam_bitwise = "~> 1.2"
gleam_otp = "~> 0.7"
gleam_stdlib = "~> 0.32"
simplifile = "~> 0.1"
gleam_otp = "~> 0.7 or ~> 1.0"
gleam_stdlib = "~> 0.32 or ~> 1.0"
simplifile = "~> 1.0"

[dev-dependencies]
exercism_test_runner = "~> 1.4"
27 changes: 14 additions & 13 deletions exercises/concept/bettys-bike-shop/manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@
# You typically do not need to edit this file

packages = [
{ name = "exercism_test_runner", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_stdlib", "glance", "gap", "simplifile", "gleam_erlang", "gleam_json"], otp_app = "exercism_test_runner", source = "hex", outer_checksum = "265A7F6E032F1B4035E322EAE1AAB8325BC69177C5E57B5C758231471E511A54" },
{ name = "gap", version = "1.0.1", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_stdlib"], otp_app = "gap", source = "hex", outer_checksum = "5E369751DB547BFBDA7735878DC04DA31FCA3112193D61D5D7566010C7C8BA98" },
{ name = "glance", version = "0.8.0", build_tools = ["gleam"], requirements = ["glexer", "gleam_stdlib"], otp_app = "glance", source = "hex", outer_checksum = "C78390EAF236A74CE7E8FD7AB07D1D1A494E6C82415B33BA6BB6923275B9FE3B" },
{ name = "argv", version = "1.0.1", build_tools = ["gleam"], requirements = [], otp_app = "argv", source = "hex", outer_checksum = "A6E9009E50BBE863EB37D963E4315398D41A3D87D0075480FC244125808F964A" },
{ name = "exercism_test_runner", version = "1.7.0", build_tools = ["gleam"], requirements = ["simplifile", "argv", "gleam_erlang", "gap", "glance", "gleam_stdlib", "gleam_community_ansi", "gleam_json"], otp_app = "exercism_test_runner", source = "hex", outer_checksum = "2FC1BADB19BEC2AE77BFD2D3A606A014C85412A7B874CAFC4BA8CF04B0B257CD" },
{ name = "gap", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_stdlib"], otp_app = "gap", source = "hex", outer_checksum = "2EE1B0A17E85CF73A0C1D29DA315A2699117A8F549C8E8D89FA8261BE41EDEB1" },
{ name = "glance", version = "0.8.1", build_tools = ["gleam"], requirements = ["gleam_stdlib", "glexer"], otp_app = "glance", source = "hex", outer_checksum = "C486C920E1865F66A404AAB9A762C4226D95B60AC2C733D175B28C3F0920CE21" },
{ name = "gleam_bitwise", version = "1.3.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_bitwise", source = "hex", outer_checksum = "B36E1D3188D7F594C7FD4F43D0D2CE17561DE896202017548578B16FE1FE9EFC" },
{ name = "gleam_community_ansi", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_community_colour", "gleam_stdlib"], otp_app = "gleam_community_ansi", source = "hex", outer_checksum = "8B5A9677BC5A2738712BBAF2BA289B1D8195FDF962BBC769569976AD5E9794E1" },
{ name = "gleam_community_colour", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_community_colour", source = "hex", outer_checksum = "036C206886AFB9F153C552700A7A0B4D2864E3BC96A20C77E5F34A013C051BE3" },
{ name = "gleam_erlang", version = "0.23.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "C21CFB816C114784E669FFF4BBF433535EEA9960FA2F216209B8691E87156B96" },
{ name = "gleam_json", version = "0.7.0", build_tools = ["gleam"], requirements = ["thoas", "gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "CB405BD93A8828BCD870463DE29375E7B2D252D9D124C109E5B618AAC00B86FC" },
{ name = "gleam_otp", version = "0.8.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_erlang"], otp_app = "gleam_otp", source = "hex", outer_checksum = "18EF8242A5E54BA92F717C7222F03B3228AEE00D1F286D4C56C3E8C18AA2588E" },
{ name = "gleam_stdlib", version = "0.32.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "ABF00CDCCB66FABBCE351A50060964C4ACE798F95A0D78622C8A7DC838792577" },
{ name = "gleam_community_ansi", version = "1.4.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_community_colour"], otp_app = "gleam_community_ansi", source = "hex", outer_checksum = "FE79E08BF97009729259B6357EC058315B6FBB916FAD1C2FF9355115FEB0D3A4" },
{ name = "gleam_community_colour", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_community_colour", source = "hex", outer_checksum = "A49A5E3AE8B637A5ACBA80ECB9B1AFE89FD3D5351FF6410A42B84F666D40D7D5" },
{ name = "gleam_erlang", version = "0.24.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "26BDB52E61889F56A291CB34167315780EE4AA20961917314446542C90D1C1A0" },
{ name = "gleam_json", version = "1.0.0", build_tools = ["gleam"], requirements = ["thoas", "gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "8B197DD5D578EA6AC2C0D4BDC634C71A5BCA8E7DB5F47091C263ECB411A60DF3" },
{ name = "gleam_otp", version = "0.9.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "5FADBBEC5ECF3F8B6BE91101D432758503192AE2ADBAD5602158977341489F71" },
{ name = "gleam_stdlib", version = "0.34.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "1FB8454D2991E9B4C0C804544D8A9AD0F6184725E20D63C3155F0AEB4230B016" },
{ name = "glexer", version = "0.7.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glexer", source = "hex", outer_checksum = "4484942A465482A0A100936E1E5F12314DB4B5AC0D87575A7B9E9062090B96BE" },
{ name = "simplifile", version = "0.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "45E2C6C7FD8D931A660CA56880EC75186BB39C84F36951B4EE284F6F95E8F65D" },
{ name = "simplifile", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "359CD7006E2F69255025C858CCC6407C11A876EC179E6ED1E46809E8DC6B1AAD" },
{ name = "thoas", version = "0.4.1", build_tools = ["rebar3"], requirements = [], otp_app = "thoas", source = "hex", outer_checksum = "4918D50026C073C4AB1388437132C77A6F6F7C8AC43C60C13758CC0ADCE2134E" },
]

[requirements]
exercism_test_runner = { version = "~> 1.4" }
gleam_bitwise = { version = "~> 1.2" }
gleam_otp = { version = "~> 0.7" }
gleam_stdlib = { version = "~> 0.32" }
simplifile = { version = "~> 0.1" }
gleam_otp = { version = "~> 0.7 or ~> 1.0" }
gleam_stdlib = { version = "~> 0.32 or ~> 1.0" }
simplifile = { version = "~> 1.0" }
2 changes: 1 addition & 1 deletion exercises/concept/bird-count/.meta/example.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ pub fn busy_days(days: List(Int)) -> Int {
case days {
[] -> 0
[today, ..rest] if today > 4 -> busy_days(rest) + 1
[today, ..rest] -> busy_days(rest)
[_today, ..rest] -> busy_days(rest)
}
}
6 changes: 3 additions & 3 deletions exercises/concept/bird-count/gleam.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ version = "0.1.0"

[dependencies]
gleam_bitwise = "~> 1.2"
gleam_otp = "~> 0.7"
gleam_stdlib = "~> 0.32"
simplifile = "~> 0.1"
gleam_otp = "~> 0.7 or ~> 1.0"
gleam_stdlib = "~> 0.32 or ~> 1.0"
simplifile = "~> 1.0"

[dev-dependencies]
exercism_test_runner = "~> 1.4"
Loading
Loading