From 74f14cbc3c51135809977b29427c7c6a2af2cc34 Mon Sep 17 00:00:00 2001 From: Thomas Schilling Date: Tue, 2 Dec 2008 15:48:00 +0000 Subject: [PATCH] Document 'loadModule'. --- compiler/main/GHC.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 5d6f034..a5d82b8 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -1120,7 +1120,13 @@ desugarModule tcm = do -- | Load a module. Input doesn't need to be desugared. -- --- XXX: Describe usage. +-- A module must be loaded before dependent modules can be typechecked. This +-- always includes generating a 'ModIface' and, depending on the +-- 'DynFlags.hscTarget', may also include code generation. +-- +-- This function will always cause recompilation and will always overwrite +-- previous compilation results (potentially files on disk). +-- loadModule :: (TypecheckedMod mod, GhcMonad m) => mod -> m mod loadModule tcm = do let ms = modSummary tcm -- 1.7.10.4