I am trying to compile haskell to JS using Fay with one directory after the --include option like so:
fay --include src\Tmv src\Tmv\Client\Main.hs
There is a SharedTypes.hs file in src\Tmv which defines a module Tmv.SharedTypes that is used in Client\Main.hs. I get the following error:
Could not find module "Tmv.SharedTypes". Use -v to see a list of files searched for.
The -v option does not work. I have tried several variations of the parameters, eg. absolute paths, quotation marks, escaped (double) backslashes.
Configuration: fay 0.10.1.0, ghc 7.4.2 (i386), Windows 7 x64
Moving this from a comment, since it apparently resolved the problem:
When GHC looks for source files, normally it expects a module
Foo.Barto be found asBar.hsin a subdirectoryFoo, relative to whatever “root” directory it starts from. For example, if you start GHCi withFooas the current directory, you’ll have problems with the moduleBareither not being found, or errors because the module name won’t match what GHC expects.Since the same rules seem to be in play in your case, to import
Tmv.SharedTypesyou wantSharedTypes.hsto be in aTmvsubdirectory of whatever the base path is, so either creating anotherTmvsubdirectory or specifyingsrcalone for--includeshould work.