File names with “meaningful” suffixes (e.g., .lhs or .o) cause the “right thing” to happen to those files.
A Haskell module.
A “literate Haskell” module.
A Haskell interface file, probably compiler-generated.
Intermediate C file produced by the Haskell compiler.
A C file not produced by the Haskell compiler.
An assembly-language source file, usually produced by the compiler.
An object file, produced by an assembler.
Files with other suffixes (or without suffixes) are passed straight to the linker.