... | ... | @@ -24,6 +24,7 @@ Here are some of the things stored in an interface file `M.hi` |
|
|
- The types of exported functions, definition of exported types, and so on.
|
|
|
- Version information, used to drive the [recompilation checker](commentary/compiler/recompilation-avoidance).
|
|
|
- The strictness, arity, and unfolding of exported functions. This is crucial for cross-module optimisation; but it is only included when you compile with `-O`.
|
|
|
- Imports and usages from those imports. This information is crucial for [recompilation avoidance](commentary/compiler/recompilation-avoidance).
|
|
|
|
|
|
|
|
|
The contents of an interface file is the result of serialising the **`IfaceSyn`** family of data types. The data types are in [compiler/iface/IfaceSyn.hs](https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/iface/IfaceSyn.hs) and [compiler/iface/IfaceType.hs](https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/iface/IfaceType.hs); the binary serialisation code is in [compiler/iface/BinIface.hs](https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/iface/BinIface.hs). The definition of a module interface is the **`ModIface`** data type in [compiler/main/HscTypes.hs](https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/main/HscTypes.hs).
|
... | ... | |