Re: [Yhc] Location of generated files

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

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Neil Mitchell wrote:
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.
good. What if Yhc is explicitly invoked on a module other than Main - then Yhc will "find" that file, right? (assuming yhc supports partial compilation). In that case I would be happy with giving an error, or putting the obj-dir in the same place as the file (what if it is used like main, via some sort of -main-is - and there is always hugs/ghci-like usage)
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.
seems good. Cabal can set that directory's position/name to be wherever it wants inside its own build directory, okay. Isaac -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGiYSZHgcxvIWYTTURAs98AJ9+068W6rIvUt4vQMzFK98KMkOZygCfcEQg AzRCoaGJXuMwcbbeYcjWlJA= =guDP -----END PGP SIGNATURE-----
participants (2)
-
Isaac Dupree
-
Neil Mitchell