From 95a05693c2ba2d15c1010a0cb9234484ada447cd Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 28 Nov 2008 16:57:07 +0000 Subject: [PATCH] ghc -M: need to add a dep on Prelude unless -fno-implicit-prelude is on --- compiler/main/DriverMkDepend.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/main/DriverMkDepend.hs b/compiler/main/DriverMkDepend.hs index 5cf8e64..5b63392 100644 --- a/compiler/main/DriverMkDepend.hs +++ b/compiler/main/DriverMkDepend.hs @@ -17,6 +17,7 @@ module DriverMkDepend ( import qualified GHC import GHC ( ModSummary(..), GhcMonad ) +import PrelNames import DynFlags import Util import HscTypes ( HscEnv, IsBootInterface, msObjFilePath, msHsFilePath, getSession ) @@ -213,6 +214,9 @@ processDeps dflags hsc_env excl_mods hdl (AcyclicSCC node) -- regular imports ; mapM_ (do_imp False) (filter (`notElem` excl_mods) (map unLoc (ms_imps node))) + + ; when (dopt Opt_ImplicitPrelude (ms_hspp_opts node)) $ + do_imp False pRELUDE_NAME } -- 1.7.10.4