From 199d8bbc6d5793d895311cb0d2296f3e1279a3e0 Mon Sep 17 00:00:00 2001 From: JJ Date: Fri, 10 May 2024 00:54:48 -0700 Subject: std: replace static with const, fix std.ast --- std/prelude/format.pk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'std/prelude/format.pk') 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") -- cgit v1.2.3-70-g09d2