From c6f276cbff28de8b316dd9f111040710dca212f6 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sat, 12 Sep 2026 11:15:58 +0700 Subject: [PATCH] Say what the two one-line refusal programs are refusing, and why --- test/programs/free-all-refused.flan | 5 +++++ test/programs/user-allocator.flan | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/test/programs/free-all-refused.flan b/test/programs/free-all-refused.flan index 873fcf9..65aeca2 100644 --- a/test/programs/free-all-refused.flan +++ b/test/programs/free-all-refused.flan @@ -1 +1,6 @@ +;;;; free-all on an allocator that does not offer it. The heap allocator frees +;;;; one block and has no region to release, so this traps rather than doing +;;;; nothing: "I released the region" and "I leaked the region" must not be the +;;;; same program text. The capability set is what says which it is, and +;;;; (can-free-all? a) is how a program asks before committing. (defn main [] i32 (free-all (heap-allocator)) 0) diff --git a/test/programs/user-allocator.flan b/test/programs/user-allocator.flan index 2876d18..3e84c5b 100644 --- a/test/programs/user-allocator.flan +++ b/test/programs/user-allocator.flan @@ -1 +1,7 @@ +;;;; The one thing in the allocator tier that really does need milestone 5. +;;;; "Here is my proc, make an Allocator from it" wants a defn's name in value +;;;; position, which is a function value. The *built-in* allocators need none +;;;; of that — their procedures are runtime symbols and no Flan type names them +;;;; — and this refusal is the other half of that claim: it says which half is +;;;; which, rather than coming back as an unknown function. (defn main [] i32 (println (make-allocator 1)) 0)