Dear Café,

Are there any techniques for compiling a single client-server program such that clients are not distributed any server code?

I'm currently looking at implementing an FRP library with a type system like Gavial's [0]. The types will make it clear on which side code belongs.
My current thinking is to have Client and Server instances of a ClientServer type class which can safely implement the functions of the other side as no-ops/bottom, but I imagine that would at least require a dead code elimination step after compilation to get the desired effect?

Adriaan

[0] https://arxiv.org/pdf/2002.06188.pdf