Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

Remove foobar

author
Gears
committer
Louis Pilfold
date (Dec 1, 2025, 11:37 AM UTC) commit ecf93c86 parent 67efac6c change-id pxqzxsnk
+37 -37
+1 -1
CHANGELOG.md
··· 124 124 because under the hood during code generation they become anonymous functions: 125 125 126 126 ```gleam 127 - pub type Foo { 127 + pub type Wibble { 128 128 Wobble(String) 129 129 } 130 130
+4 -4
compiler-core/src/javascript/tests/numbers.rs
··· 446 446 " 447 447 pub fn main(x) { 448 448 case x { 449 - 0._1 -> \"bar\" 450 - _ -> \"foo\" 449 + 0._1 -> \"wobble\" 450 + _ -> \"wibble\" 451 451 } 452 452 } 453 453 " ··· 460 460 " 461 461 pub fn main(x) { 462 462 case x { 463 - 100.001e123_456_789 -> \"bar\" 464 - _ -> \"foo\" 463 + 100.001e123_456_789 -> \"wobble\" 464 + _ -> \"wibble\" 465 465 } 466 466 } 467 467 "
+4 -4
compiler-core/src/javascript/tests/snapshots/gleam_core__javascript__tests__numbers__inf_float_case_statement.snap
··· 1 1 --- 2 2 source: compiler-core/src/javascript/tests/numbers.rs 3 - expression: "\npub fn main(x) {\n case x {\n 100.001e123_456_789 -> \"bar\"\n _ -> \"foo\"\n }\n}\n" 3 + expression: "\npub fn main(x) {\n case x {\n 100.001e123_456_789 -> \"wobble\"\n _ -> \"wibble\"\n }\n}\n" 4 4 --- 5 5 ----- SOURCE CODE 6 6 7 7 pub fn main(x) { 8 8 case x { 9 - 100.001e123_456_789 -> "bar" 10 - _ -> "foo" 9 + 100.001e123_456_789 -> "wobble" 10 + _ -> "wibble" 11 11 } 12 12 } 13 13 ··· 16 16 error: Float outside of valid range 17 17 ┌─ /src/one/two.gleam:4:3 18 18 19 - 4 │ 100.001e123_456_789 -> "bar" 19 + 4 │ 100.001e123_456_789 -> "wobble" 20 20 │ ^^^^^^^^^^^^^^^^^^^ 21 21 22 22 This float value is too large to be represented by a floating point type:
+5 -5
compiler-core/src/javascript/tests/snapshots/gleam_core__javascript__tests__numbers__underscore_after_decimal_point_case_statement.snap
··· 1 1 --- 2 2 source: compiler-core/src/javascript/tests/numbers.rs 3 - expression: "\npub fn main(x) {\n case x {\n 0._1 -> \"bar\"\n _ -> \"foo\"\n }\n}\n" 3 + expression: "\npub fn main(x) {\n case x {\n 0._1 -> \"wobble\"\n _ -> \"wibble\"\n }\n}\n" 4 4 --- 5 5 ----- SOURCE CODE 6 6 7 7 pub fn main(x) { 8 8 case x { 9 - 0._1 -> "bar" 10 - _ -> "foo" 9 + 0._1 -> "wobble" 10 + _ -> "wibble" 11 11 } 12 12 } 13 13 ··· 15 15 ----- COMPILED JAVASCRIPT 16 16 export function main(x) { 17 17 if (x === 0.1) { 18 - return "bar"; 18 + return "wobble"; 19 19 } else { 20 - return "foo"; 20 + return "wibble"; 21 21 } 22 22 }
+7 -7
compiler-core/src/language_server/tests/completion.rs
··· 405 405 #[test] 406 406 fn importable_does_not_add_extra_new_line_if_imports_exist() { 407 407 let dep = "pub fn wobble() {\nNil\n}"; 408 - let prefix = "import foo\n\n"; 408 + let prefix = "import wibble\n\n"; 409 409 let code = ""; 410 410 411 411 assert_completion_with_prefix!( 412 412 TestProject::for_source(code) 413 413 .add_module("dep", dep) 414 - .add_module("foo", ""), 414 + .add_module("wibble", ""), 415 415 prefix 416 416 ); 417 417 } ··· 425 425 assert_completion_with_prefix!( 426 426 TestProject::for_source(code) 427 427 .add_module("dep", dep) 428 - .add_module("foo", ""), 428 + .add_module("wibble", ""), 429 429 prefix 430 430 ); 431 431 } ··· 972 972 #[test] 973 973 fn local_variable_inside_nested_exprs() { 974 974 let code = r#" 975 - type Foo { Bar(List(#(Bool))) } 975 + type Wibble { Wobble(List(#(Bool))) } 976 976 fn wibble() { 977 - Bar([#(!{ 978 - let foo = True 979 - foo 977 + Wobble([#(!{ 978 + let wibble = True 979 + wibble 980 980 })]) 981 981 todo 982 982 }
+15 -15
compiler-core/src/language_server/tests/snapshots/gleam_core__language_server__tests__completion__local_variable_inside_nested_exprs.snap
··· 1 1 --- 2 2 source: compiler-core/src/language_server/tests/completion.rs 3 - expression: "\ntype Foo { Bar(List(#(Bool))) }\nfn wibble() {\n Bar([#(!{\n let foo = True\n foo\n })])\n todo\n}\n" 3 + expression: "\ntype Wibble { Wobble(List(#(Bool))) }\nfn wibble() {\n Wobble([#(!{\n let wibble = True\n wibble\n })])\n todo\n}\n" 4 4 --- 5 - type Foo { Bar(List(#(Bool))) } 5 + type Wibble { Wobble(List(#(Bool))) } 6 6 fn wibble() { 7 - Bar([#(!{ 8 - let foo = True 9 - foo| 7 + Wobble([#(!{ 8 + let wibble = True 9 + wib|ble 10 10 })]) 11 11 todo 12 12 } 13 13 14 14 15 15 ----- Completion content ----- 16 - Bar 17 - kind: Constructor 18 - detail: fn(List(#(Bool))) -> Foo 19 - sort: 2_Bar 20 - desc: app 21 - edits: 22 - [5:4-5:4]: "Bar" 23 16 Error 24 17 kind: Constructor 25 18 detail: gleam ··· 40 33 kind: EnumMember 41 34 detail: gleam 42 35 sort: 4_True 43 - foo 36 + Wobble 37 + kind: Constructor 38 + detail: fn(List(#(Bool))) -> Wibble 39 + sort: 2_Wobble 40 + desc: app 41 + edits: 42 + [5:4-5:4]: "Wobble" 43 + wibble 44 44 kind: Variable 45 45 detail: Bool 46 - sort: 2_foo 46 + sort: 2_wibble 47 47 desc: app 48 48 docs: "A locally defined variable." 49 49 edits: 50 - [5:4-5:4]: "foo" 50 + [5:4-5:4]: "wibble" 51 51 wibble 52 52 kind: Function 53 53 detail: fn() -> a
+1 -1
compiler-core/src/parse.rs
··· 3111 3111 // "hi" 3112 3112 // True 3113 3113 // [1,2,3] 3114 - // foo <> "bar" 3114 + // wibble <> "wobble" 3115 3115 fn parse_const_value(&mut self) -> Result<Option<UntypedConstant>, ParseError> { 3116 3116 let constant_result = self.parse_const_value_unit(); 3117 3117 match constant_result {