lips
lips copied to clipboard
Make all builtin scheme based macros hygienic
After Variable documentation #49 and Hygienic macro syntax-rules #43 are all done all macros should be rewritten as hygienic using syntax-rules. It's problematic to write code that use arguments like list and macro that may use that function.
As reference you can check 2ea44039353df7c578a8a5007baf18f3e5ed6306
(define (member obj list)
"(member obj list)
Function return first object in the list that match using equal? function."
(typecheck "member" list (vector "nil" "pair"))
(%mem/search car equal? obj list))
vector is a macro that use list function so it break with cryptic error:
(member 'foo '(foo bar))
'(foo bar) is not a function
case macro was reverted because it took to long to execute unit tests 600% slowdown after adding that macro. This will need to wait for compiling/transforming all macros away before evaluate.