
Hi
What about * foo/System/Cmd.hs, module Data.Whatever or other ridiculous arrangements, where the actual module name contains some number of dots greater than zero but doesn't match the directory structure.
Similar to putting module Foo in Bar.hs. There is no chance this will ever be found by the compiler, so we emit an error. The one exception is module Main, which can have any file name.
You may want to allow filenames that replace some slashes with dots, such as * foo/System.Cmd.hs, module System.Cmd * foo/System/FilePath.Posix.hs, module System.FilePath.Posix both of which should have root "foo", I think.
Yes, I did intend to allow this. This is only an issue for finding the root, everything else works out as before.
Anyway, please don't look in the source directory for .hi files (assuming one didn't explicitly tell it to), it confuses yhc when looking at something ghc's been compiling.
Ah, good point! I've been bitten by this before, in the other direction, with GHC reading Yhc's .hi files. I guess this is another reason why this proposal is better than the current situation. How about we default to being "yhc_obj" instead of "obj" - that way we get a clear Yhc specific location, we won't clash with qhc, and we don't run the risk of trampling anyone's image data etc. Thanks Neil