aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Janiczek <martin@janiczek.cz>2024-12-15 14:10:25 +0100
committerLouis Pilfold <louis@lpil.uk>2024-12-20 13:48:20 +0000
commit999d0805fa10df85ed84b2285714f65691ae33dd (patch)
tree9338998ce4cab70faecc386e80086818ea3882ab
parent6ee4726085624e53e3a10829efc95b5e25741206 (diff)
downloadgleam_stdlib-999d0805fa10df85ed84b2285714f65691ae33dd.tar.gz
gleam_stdlib-999d0805fa10df85ed84b2285714f65691ae33dd.zip
Warn about unexpected behaviour of io.debug
-rw-r--r--src/gleam/io.gleam2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gleam/io.gleam b/src/gleam/io.gleam
index 4487a60..d55599b 100644
--- a/src/gleam/io.gleam
+++ b/src/gleam/io.gleam
@@ -89,6 +89,8 @@ pub fn println_error(string: String) -> Nil
/// // [2, 3]
/// ```
///
+/// Note: At runtime Gleam doesn't have type information and uses runtime reflection to print the values. This can result in some values being shown in an unexpected way.
+///
pub fn debug(term: anything) -> anything {
term
|> string.inspect