File tree Expand file tree Collapse file tree 3 files changed +5
-53
lines changed Expand file tree Collapse file tree 3 files changed +5
-53
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## Unreleased
4
+
5
+ - The deprecated ` debug ` function in the ` io ` module has been removed.
6
+ - The deprecated ` from ` function in the ` dynamic ` module has been removed.
7
+
3
8
## v0.60.0 - 2025-05-13
4
9
5
10
- The deprecated items in the ` dynamic ` module have been removed.
Original file line number Diff line number Diff line change @@ -29,11 +29,6 @@ pub type Dynamic
29
29
@ external ( javascript , "../gleam_stdlib.mjs" , "classify_dynamic" )
30
30
pub fn classify ( data : Dynamic ) -> String
31
31
32
- @ deprecated ( "Please use the other functions in the gleam/dynamic module" )
33
- @ external ( erlang , "gleam_stdlib" , "identity" )
34
- @ external ( javascript , "../gleam_stdlib.mjs" , "identity" )
35
- pub fn from ( a : anything) -> Dynamic
36
-
37
32
/// Create a dynamic value from a bool.
38
33
///
39
34
@ external ( erlang , "gleam_stdlib" , "identity" )
Original file line number Diff line number Diff line change 1
- import gleam/string
2
-
3
1
/// Writes a string to standard output (stdout).
4
2
///
5
3
/// If you want your output to be printed on its own line see `println`.
@@ -59,49 +57,3 @@ pub fn println(string: String) -> Nil
59
57
@ external ( erlang , "gleam_stdlib" , "println_error" )
60
58
@ external ( javascript , "../gleam_stdlib.mjs" , "console_error" )
61
59
pub fn println_error ( string : String ) -> Nil
62
-
63
- /// Writes a value to standard error (stderr) yielding Gleam syntax.
64
- ///
65
- /// The value is returned after being printed so it can be used in pipelines.
66
- ///
67
- /// ## Example
68
- ///
69
- /// ```gleam
70
- /// debug("Hi mum")
71
- /// // -> "Hi mum"
72
- /// // <<"Hi mum">>
73
- /// ```
74
- ///
75
- /// ```gleam
76
- /// debug(Ok(1))
77
- /// // -> Ok(1)
78
- /// // {ok, 1}
79
- /// ```
80
- ///
81
- /// ```gleam
82
- /// import gleam/list
83
- ///
84
- /// [1, 2]
85
- /// |> list.map(fn(x) { x + 1 })
86
- /// |> debug
87
- /// |> list.map(fn(x) { x * 2 })
88
- /// // -> [4, 6]
89
- /// // [2, 3]
90
- /// ```
91
- ///
92
- /// Note: At runtime Gleam doesn't have type information anymore. This combined
93
- /// with some types having the same runtime representation results in it not
94
- /// always being possible to correctly choose which Gleam syntax to show.
95
- ///
96
- @ deprecated ( "To debug print a value use the `echo` keyword instead" )
97
- pub fn debug ( term : anything) -> anything {
98
- term
99
- |> string . inspect
100
- |> do_debug_println
101
-
102
- term
103
- }
104
-
105
- @ external ( erlang , "gleam_stdlib" , "println_error" )
106
- @ external ( javascript , "../gleam_stdlib.mjs" , "print_debug" )
107
- fn do_debug_println ( string string : String ) -> Nil
You can’t perform that action at this time.
0 commit comments