add HashableTupleInstances and code generator