Library for implementing enumeration procedures for datatypes