File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ pub fn main() {
5353
5454pub fn process_single ( src_filename : String , is_debug ) {
5555 bool . guard ( ! is_debug , Nil , fn ( ) {
56- echo # ( "Processing" , src_filename )
56+ io . println ( "Processing: " <> src_filename )
5757 Nil
5858 } )
5959
Original file line number Diff line number Diff line change 11import common . { decoder_name_of_t }
22import glance
33import gleam/int
4+ import gleam/io
45import gleam/list
56import gleam/option
67import gleam/string
@@ -64,7 +65,7 @@ fn gen_decoder(typ) {
6465 )
6566 }
6667 x -> {
67- echo # ( "warning: unsupported decoding" , x )
68+ io . println_error ( string . inspect ( # ( "warning: unsupported decoding" , x ) ) )
6869 gens . Direct ( "todo" )
6970 }
7071 }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ pub fn main() {
1111
1212const foo_module = "
1313import gleam/option.{type Option, Some}
14+ import gleam/io
1415
1516pub type FooJson {
1617 Foo(
@@ -48,6 +49,7 @@ pub type BarJson {
4849const foo_json_test = "
4950import gleam/io
5051import gleam/result
52+ import gleam/string
5153import internal/foo
5254import internal/foo_json
5355
@@ -58,15 +60,14 @@ pub fn main() {
5860 |> foo_json.to_string
5961
6062 let foo_b = foo_str |> foo_json.from_string |> result.lazy_unwrap(fn() {
61- echo \" parse error calling foo_json.from_string\"
6263 panic
6364 })
6465
6566 case foo_a == foo_b {
6667 True -> io.println(\" foos equal\" )
6768 False -> {
68- echo #(\" a\" , foo_a)
69- echo #(\" b\" , foo_b)
69+ io.println(string.inspect( #(\" a\" , foo_a)) )
70+ io.println(string.inspect( #(\" b\" , foo_b)) )
7071 panic as \" not equal\"
7172 }
7273 }
@@ -78,6 +79,7 @@ pub fn main() {
7879const bar_json_test = "
7980import gleam/io
8081import gleam/result
82+ import gleam/string
8183import internal/foo
8284import internal/bar
8385import internal/bar_json
@@ -91,15 +93,15 @@ pub fn main() {
9193 |> bar_json.to_string
9294
9395 let bar_b = bar_str |> bar_json.from_string |> result.lazy_unwrap(fn() {
94- echo \" parse error calling bar_json.from_string\"
96+ io.println_error( \" parse error calling bar_json.from_string\" )
9597 panic
9698 })
9799
98100 case bar_a == bar_b {
99101 True -> io.println(\" bars equal\" )
100102 False -> {
101- echo #(\" a\" , bar_a)
102- echo #(\" b\" , bar_b)
103+ io.println_error(string.inspect( #(\" a\" , bar_a)) )
104+ io.println_error(string.inspect( #(\" b\" , bar_b)) )
103105 panic as \" not equal\"
104106 }
105107 }
You can’t perform that action at this time.
0 commit comments