From: Thomas Schilling Date: Tue, 2 Dec 2008 15:48:00 +0000 (+0000) Subject: Document 'loadModule'. X-Git-Tag: 2009-03-13~364 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=74f14cbc3c51135809977b29427c7c6a2af2cc34 Document 'loadModule'. --- 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