Macro Processing
I was bitten by a silly d2c bug this weekend. I've been trying to get the Koala web server to compile under Gwydion Dylan, but to do that required a more-functional "functional-extensions" library than currently exists in GD. To get that to work required additional support for several other things, etc., etc.
While trying to implement some rudimentary profiling I found myself unable to compile my revised common-dylan library. The error message I got was:
Parsing when.dylan
"when.dylan", line 104, character 1 through line 152, character 4:
define function main()
^^^^^^^^^^^^^^^^^^^^^^
through
end;
^^^^^^^^^^^
Error: Syntax error in ``define function'' macro. None of the main rules
matched.
skipping rest of when.dylan
seeding representations
Unfortunately, this caused me to think that I had an error in the "dynamic-bind" macro. I spent an hour or two in a fruitless search for the control character, bad escape sequence, or other typo that might be the culprit only to discover I had simply forgotten to import the module defining the macro. We really need better error messages to protect idiots like myself.
While trying to implement some rudimentary profiling I found myself unable to compile my revised common-dylan library. The error message I got was:
Parsing when.dylan
"when.dylan", line 104, character 1 through line 152, character 4:
define function main()
^^^^^^^^^^^^^^^^^^^^^^
through
end;
^^^^^^^^^^^
Error: Syntax error in ``define function'' macro. None of the main rules
matched.
skipping rest of when.dylan
seeding representations
Unfortunately, this caused me to think that I had an error in the "dynamic-bind" macro. I spent an hour or two in a fruitless search for the control character, bad escape sequence, or other typo that might be the culprit only to discover I had simply forgotten to import the module defining the macro. We really need better error messages to protect idiots like myself.