Meaningful file suffixes

The Glasgow Haskell Compiler User's Guide, Version 6.2
Prev | Chapter 4. Using GHC | Next

# 4.3. Meaningful file suffixes

File names with “meaningful” suffixes (e.g., `.lhs` or `.o`) cause the “right thing” to happen to those files.

`.lhs`

  A “literate Haskell” module.

`.hs`

  A not-so-literate Haskell module.

`.hi`

  A Haskell interface file, probably compiler-generated.

`.hc`

  Intermediate C file produced by the Haskell compiler.

`.c`

  A C file not produced by the Haskell compiler.

`.s`

  An assembly-language source file, usually produced by the compiler.

`.o`

  An object file, produced by an assembler.

Files with other suffixes (or without suffixes) are passed straight to the linker.

Prev | Home | Next
Static vs. Dynamic options | Up | Modes of operation