move function type to its top level enum