Serious Eats' recipe for aligot takes mashed potatoes — in this case, passed through a ricer — and works them quite thoroughly in a pan with butter and cream, stirring constantly in order to make the potatoes sticky. Then, the grated cheeses are folded in, and as the outlet explains, the cheese will not separate or "break" as melted cheeses sometimes do.