From 53c4bc4b0a438afa22cbebc4596e8dbf1bc7ba52 Mon Sep 17 00:00:00 2001 From: sof Date: Thu, 16 Sep 1999 17:11:38 +0000 Subject: [PATCH] [project @ 1999-09-16 17:11:38 by sof] mkVanillaModule: sigh, special treatment for module Main. --- ghc/compiler/basicTypes/Module.lhs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/basicTypes/Module.lhs b/ghc/compiler/basicTypes/Module.lhs index ead105a..38a3609 100644 --- a/ghc/compiler/basicTypes/Module.lhs +++ b/ghc/compiler/basicTypes/Module.lhs @@ -194,8 +194,14 @@ mkModule = Module mkVanillaModule :: ModuleName -> Module mkVanillaModule name = Module name UserMod dell where - dell | opt_Static || opt_CompilingPrelude = NotDll - | otherwise = Dll + main_mod = mkSrcModuleFS SLIT("Main") + + -- Main can never be in a DLL - need this + -- special case in order to correctly + -- compile PrelMain + dell | opt_Static || opt_CompilingPrelude || + name == main_mod = NotDll + | otherwise = Dll mkThisModule :: ModuleName -> Module -- The module being comiled -- 1.7.10.4