The prelude's macro module drops a defn- that names a macro, as it drops a defn

This commit is contained in:
Joseph Ferano 2026-09-25 08:40:35 +07:00
parent 63f1a1357f
commit 376e990689

View File

@ -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