std.show

Value to string conversion.

Types

type Show a = { show : a -> String }

Show a represents a conversion function from a to a readable string.

Values

let show ?s : forall a . [std.show.Show a] -> a -> String

Converts a value into a string.

let { assert } = import! std.test
let list @ { ? } = import! std.list

assert (show 123 == "123")
assert (show 3.14 == "3.14")
assert (show "abc" == "\"abc\"")
assert (show (list.of [1, 2, 3]) == "[1, 2, 3]")