The extension wasn't really part of the filename in those days. So aux.c and aux.hs is interpreted as aux. The funny thing is that Microsoft soon recognized how bad it was and added a flag to make it unix-like (\dev\nul etc) and free the names in dos 2.0, but the default stayed as it was.
Niklas