Isn't that the purpose of including sample code?  So that the code
classifier has a reasonable chance of guessing which language some code
belongs to?   As it stands at the moment github thinks that all the Mercury
repositories are Objective C.

Mercury has existed since late 1993, over 20 years.  There has been little
real confusion over the .m file extension in that time.  I'm not saying that
Objective C should change its file extension (it has existed since 1983).
But that changing the file extension for a language so that it's convenient
for github is not the right way to solve this problem.  I'm also confident
that linguist handles other conflicting file extensions without any
problems: I'm sure this is not the first conflict.