Since the <
operator is inlined with :erlang.</2
, I expected the compiler to resolve its typing to a parametric polymorphic definition, something akin to (a, a) -> boolean() when a: term()
. I didn’t expect singleton types.
I gave a simplified example to illustrate the problem, which I encountered when implementing client-server consistency tests in Hologram. Basically, I test whether manually transpiled Erlang functions behave exactly the same as their server counterparts.