dynamics on polymorphic datatype