FIX #1748: -main-is wasn't handling the case of a single hierarchical module
[ghc-hetmet.git] / compiler / main / Finder.lhs
index 25bf90c..5419112 100644 (file)
@@ -495,7 +495,7 @@ mkStubPaths dflags mod location
                 -- -I<dir> along with -stubdir <dir>.
                 include_basename
                         | Just _ <- stubdir = mod_basename 
-                        | otherwise         = filenameOf mod_basename
+                        | otherwise         = filenameOf src_basename
      in
         (stub_basename `joinFileExt` "c",
         stub_basename `joinFileExt` "h",