I am using the
--red-only switch with the verbosity set to 2 to compile a very simple Red program to its Red/System equivalent. The program is:
Red  red-load: func [source [file! url! string! binary!]] [ load source ]
It produces a certain amount of output, which I redirected to a file. My goal was to add a Red/System header to this and build it.
After getting rid of some commentary lines, the next barrier is that this code had not expanded at least some macros, so I had to add a
#include for runtime/macros.reds. But then I got this error in the expansion of one of those (macros TO_CTX):
*** Compilation Error: invalid target type casting: red-context! *** in file: %/home/hostilefork/Projects/red/embedme.reds *** in function: f_modulo *** at line: 11 *** near: (as red-context! ((as series! ctx15/value) + 1))
red-context! and some other
red-*! datatypes used in the Red runtime code...when Red/System needs to talk about values it gets from Red. But they are not mentioned in the Red/System spec. Can they be used in ordinary Red/System code, or is there something "special" allowing them only internally?