this is not clearly going to work due to monomorphization, which convverts each enum<T> to a distinct "type" from POV of the shape code