Hacking typeclasses for Erlang records