
There are various reasons why one might have a Haskell file which doesn't have the expected "Module.hs" filename, in particular when putting ghc into some larger system which does its own thing with files. I may well want this as part of UniForM in the next few months. However ghc doesn't provide anyway support for this, and while you could create a symbolic link with a name ghc approves of to the real file, that seems somewhat messy. gcc has an option which allows you to specify that the input is, say, a C program (even though it's called "hello.txt") but it's rather messy and might take too long to implement. I suggest instead a new option called -virtual-name or something similar, so that ghc -virtual-name Module.hs /blah/horrible932 will compile the contents of /blah/horrible932, but treat it as if it were called "Module.hs".
participants (1)
-
George Russell