There's been a long-running complaint in the Redbol world that if you don't run a function directly from a WORD! or PATH!, it doesn't know a name for it:
r3-alpha>> append 1 <d> ; dispatched as WORD!
** Script error: append does not allow integer! for its series argument
r3-alpha>> do compose [(:append) 1 <d>] ; dispatched as ACTION!
** Script error: -unnamed- does not allow integer! for its series argument
To try and improve on this, Red climbs the stack a bit to find something with a name...but the resulting error is gibberish:
red>> do compose [(:append) 1 <d>]
*** Script Error: do does not allow integer for its series argument
The problem this is showing is that ACTION!s are things that can be known by many names, and when they get "extracted" from a WORD! they lose the label.
Today I did something that's kind of obvious-seeming: to make it so that GET-WORD! and GET-PATH! evaluations cache the name in the action cell instance. This isn't doing anything to the shared data for the action, just poking a pointer to the word's spelling data in the cell.
It's a welcome improvement:
>> do compose [(:append) 1 <d>]
** Script Error: append does not allow #[datatype! integer!]
for its series argument
>> do compose [(:append/only) 1 <d>]
** Script Error: append does not allow #[datatype! integer!]
for its series argument
The details of why this would be tricky just relate to the fact that bits don't grow on trees...and the "rules of the game" limit cells to 4 platform pointers in size. To make a long-story-short: while ACTION! "archetypes" can't spare a pointer at this time, ACTION! instances can...and the distinction of whether an action is an archetype or not is made by detecting the properties of the pointed-to-series being a WORD-spelling or action-descriptor-array.
If you write a function that processes a function to create a derived one, you'll need some tools for working with this cached symbol...otherwise you'd lose it just by storing actions in temporary variables. Expect to see a few cases of that. I'll look into it when time permits. But this is already a lot better.