[AなりB] - B is often an unexpected or unusual thing.
Mostly used in written language and generally is not used in daily conversations.
My book says that this is for a strange or unexpected event. X スイッチを入れるなり電気がついた。 O スイッチを入れると電気がついた。 O スイッチを入れるなり爆発が起きた。 However, my book says it is only used for Verb(辞書形)+なり, but I have sometimes seen cases of Verb(た形)+なり from other sources. Does anyone know which is correct?
Verb(た形)+なり is used in a different way. It implies one movement is continuing. 〜したまま。 会社を出たなり、いつまでも帰らない。He left the office and hasn't come back. 彼女を見つめたなり、しばらくの間微動だにしなかった。He stared at her and didn't move an inch for a while. You can find better translations.
that sounds like a totally different nari, so i created a new page for it: [nari2]
What about a (noun)+なり？ Example: きりとて、二つが相容れることもまた不可能なり。 The nari is after 不可能 which is a noun or na-adj. Any idea what nari means here?