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

deprecate io.debug in favour of echo #704

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- The `float` modeule gains the `to_precision` function.
- The `try_fold` function in the `iterator` module is now tail recursive.
- The performance of many functions in the `string` module has been improved.
- The `debug` function in the `io` module has been deprecated in favour of
the `echo` keyword.

## v0.40.0 - 2024-08-19

Expand Down
1 change: 1 addition & 0 deletions src/gleam/io.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ fn do_println_error(string string: String) -> Nil
/// // [2, 3]
/// ```
///
@deprecated("To debug print a value use the `echo` keyword instead")
pub fn debug(term: anything) -> anything {
term
|> string.inspect
Expand Down