Types as keys

(As usual) @kerrek-sb has the answer you want.…