diff options
author | JJ | 2024-05-10 07:54:48 +0000 |
---|---|---|
committer | JJ | 2024-05-10 07:54:48 +0000 |
commit | 199d8bbc6d5793d895311cb0d2296f3e1279a3e0 (patch) | |
tree | fc71fd1d2f20029294f309f2947559e5b4d3d704 /std/prelude/format.pk | |
parent | d3c91164aff6a620348c81776fdae37fa41b81c3 (diff) |
std: replace static with const, fix std.ast
Diffstat (limited to 'std/prelude/format.pk')
-rw-r--r-- | std/prelude/format.pk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/std/prelude/format.pk b/std/prelude/format.pk index 6fc7c99..3bb5825 100644 --- a/std/prelude/format.pk +++ b/std/prelude/format.pk @@ -21,7 +21,7 @@ pub func print(params: varargs[Display]) = ## Note: this function is special! It does not count as a side effect. ## This breaks effect tracking, of course: but `dbg` is for debugging. ## It will produce a warning in code compiled for release. -@[no_side_effect] +@[pure] pub func dbg(params: varargs[Debug]) = stdout.write(params.map(x => x.dbg).join(" "), "\n") @@ -46,7 +46,7 @@ pub func dbg[T: Debug](self: Iter[T]): str = "[{}]".fmt(self.map(x => x.dbg).join(", ")) ## The fmt macro. Builds a formatted string from its arguments. -pub macro fmt(self: static[str], args: varargs[Display]): str = +pub macro fmt(self: const str, args: varargs[Display]): str = let parts = self.split("{}") if parts.len != args.len + 1 then macro_error("wrong number of arguments") |