The following fields may be optionally present in any stanza, and give information for the building of the corresponding library or executable. See also Section 2.2 for a way to supply system-dependent values for these fields.
Is the component buildable? Like some of the other fields below, this field is more useful with the slightly more elaborate form of the simple build infrastructure described in Section 2.2.
A list of modules used by the component but not exposed to users. For a library component, these would be hidden modules of the library. For an executable, these would be auxiliary modules to be linked with the file named in the main-is field.
The name of root directory of the module hierarchy.
A list of Haskell extensions used by every module. Extension names are the constructors of the Extension type. These determine corresponding compiler options. In particular, CPP specifies that Haskell source files are to be preprocessed with a C preprocessor.
Extensions used only by one module may be specified by placing a LANGUAGE pragma in the source file affected, e.g.:
{-# LANGUAGE CPP, MultiParamTypeClasses #-}
Additional options for GHC. You can often achieve the same effect using the extensions field, which is preferred.
Options required only by one module may be specified by placing an OPTIONS_GHC pragma in the source file affected.
Additional options for Hugs. You can often achieve the same effect using the extensions field, which is preferred.
Options required only by one module may be specified by placing an OPTIONS_HUGS pragma in the source file affected.
Additional options for nhc98. You can often achieve the same effect using the extensions field, which is preferred.
Options required only by one module may be specified by placing an OPTIONS_NHC pragma in the source file affected.
A list of header files from standard include directories or those listed in include-dirs, to be included in any compilations via C. These files typically contain function prototypes for foreign imports used by the package.
A list of directories to search for header files, both when using a C preprocessor and when compiling via C.
A list of C source files to be compiled and linked with the Haskell files.
If you use this field, you should also name the C files in CFILES pragmas in the Haskell source files that use them, e.g.:
{-# CFILES dir/file1.c dir/file2.c #-}These are ignored by the compilers, but needed by Hugs.
A list of extra libraries to link with.
A list of directories to search for libraries.
Command-line arguments to be passed to the C compiler. Since the arguments are compiler-dependent, this field is more useful with the setup described in Section 2.2.
Command-line arguments to be passed to the linker. Since the arguments are compiler-dependent, this field is more useful with the setup described in Section 2.2.
On Darwin/MacOS X, a list of frameworks to link to. See Apple's developer documentation for more details on frameworks. This entry is ignored on all other platforms.