Implementation of domain datatype and relevant bifs.