- ann am pàirc = in a park
- anns a’ phàirc = in the park
More rambling: Not in ann an / ann am, here the an part is just repeated preposition. I believe ann an is etymologically basically “in it in…” (we are in it, in a park) – but I am not sure about it. (In Irish it still is just i – in older texts sometimes written a, eg. i bpáirc ‘in a park’, i nÉirinn or in old texts a n-Éirinn ‘in Ireland’.)
Before the definite article it becomes anns, and the dative definitive article causes lenition (eg. anns a’ phàirc, ‘in the park’) AFAIK sometimes shortened to sa(n) (sa phàirc), from older ins (cf. Irish sa pháirc or ins an pháirc ‘in the park’).