flan/test/programs/user-allocator.flan

8 lines
506 B
Plaintext

;;;; 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)