Use OPTIONS rather than OPTIONS_GHC for pragmas
[ghc-hetmet.git] / compiler / main / Finder.lhs
index df1fa3e..f9e3aa4 100644 (file)
@@ -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/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