Evolution without exchange or other method

#1

how to evolve a pokemon like a haunter to gengar without exchanging in pokemon sun?