X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FFinder.lhs;h=24c52bbb66858b51d03590774ed91fabfccaeb44;hb=d5036717526fdd27f6a1c770fd19a6090af60254;hp=df1fa3e6629bb37f03d90adc09f6c92d7e16da38;hpb=046ee54f048ddd721dcee41916d6a6f68db3b15b;p=ghc-hetmet.git diff --git a/compiler/main/Finder.lhs b/compiler/main/Finder.lhs index df1fa3e..24c52bb 100644 --- a/compiler/main/Finder.lhs +++ b/compiler/main/Finder.lhs @@ -4,6 +4,13 @@ \section[Finder]{Module Finder} \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module Finder ( flushFinderCaches, FindResult(..), @@ -243,6 +250,14 @@ findHomeModule hsc_env mod_name = exts | isOneShot (ghcMode dflags) = hi_exts | otherwise = source_exts in + + -- special case for GHC.Prim; we won't find it in the filesystem. + -- This is important only when compiling the base package (where GHC.Prim + -- is a home module). + if mod == gHC_PRIM + then return (Found (error "GHC.Prim ModLocation") mod) + else + searchPathExts home_path mod exts