From 376e99068936b4fee9be8b85355cdb6110f5eee2 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 25 Sep 2026 08:40:35 +0700 Subject: [PATCH] The prelude's macro module drops a defn- that names a macro, as it drops a defn --- lib/macro.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/macro.ml b/lib/macro.ml index 177b4c34..b56d3819 100644 --- a/lib/macro.ml +++ b/lib/macro.ml @@ -168,7 +168,7 @@ let reduce (forms : Form.t list) : Form.t list = List.iter (fun f -> match head_name f with - | Some (("defn" | "defmacro"), n) when not (List.mem n !out) -> + | Some (("defn" | "defn-" | "defmacro"), n) when not (List.mem n !out) -> if names_macro !out f then begin out := n :: !out; changed := true end | _ -> ()) forms @@ -188,7 +188,7 @@ let reduce (forms : Form.t list) : Form.t list = List.filter (fun f -> match head_name f with - | Some ("defn", n) -> not (List.mem n !out) + | Some (("defn" | "defn-"), n) -> not (List.mem n !out) | _ -> true) forms