Do you want a pointer to a proc or to type-erase your proc as a pointer? For the last case, I don't see why `cast[pointer](a)` wouldn't work, I use this extensively: <https://github.com/mratsim/photon-jit/blob/ef19544/photon_jit/photon_types.nim#L91-L93>
and also for type-erasing functions in schedulers.