Dear Ali Ashkar,
Wa alaikum assalam
In my humble opinion, the verse is not providing an instruction or insinuation that mosques can only be visited by men. The verse is hedged in a specific context (theme running from the
masjid-dirar and is being contrasted).
For example, in verse 9:107 and implied by verse 9:108, a mosque is referenced that appears to be founded to cause dissension. The group of people visiting / involved in its foundation / have been called out as liars.
Then in verse 9:108, another mosque is mentioned (arguably the first mosque) and its purpose is contrasted with the dissension mosque mentioned in the previous verse (9:107). The group of people that are part of this mosque are mentioned as those who love to purify themselves.
Hence, two sets of people are contrasted in a specific context dealing with two specific early mosques.
Therefore, verse 9:108 is simply addressing a mosque (arguably the first mosque) and is referring to the
'men' in that mosque. It is simply referencing a particular group of people. It may be that all those within this particular mosque were men, but that is not the purpose of the verse.
The Quran elsewhere makes it quite clear what the purpose of the mosques generally is and there is no gender discrimination.
[1] & [2]Please also kindly see below an explicit instruction:
007:031 (Part)
"O Children of Adam! Take your adornment to every place of worship (masjid)..."As you will no doubt notice, this is a specific instruction regarding mosques and one that is addressed to all believing men and women. This verse makes the expectation clear.
I hope this helps, God willing.
Regards,
Joseph
REFERENCES:[1] Verse 2:187 and the Role of Classical Mosqueshttp://quransmessage.com/forum/index.php?topic=788.msg2894#msg2894[2] THE ROLE OF CLASSICAL MOSQUEShttps://www.facebook.com/joseph.a.islam/posts/251879144949220