What is the correct way to include files / directories in Fay?

I am trying to compile haskell for JS using Fay with one directory after the --include option, for example:

fay --include src\Tmv src\Tmv\Client\Main.hs

In src \ Tmv there is a SharedTypes.hs file that defines the Tmv.SharedTypes module 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 tried several options for options, for example. absolute paths, quotation marks, escaped (double) backslashes.
Configuration: fay 0.10.1.0, ghc 7.4.2 (i386), Windows 7 x64

+6
source share
1 answer

Moving this from a comment as it seems to have resolved the issue:

When the GHC searches for source files, it usually expects that the Foo.Bar module will be found as Bar.hs in the Foo subdirectory with respect to any root directory from which it starts. For example, if you start GHCi with Foo as the current directory, you will have problems with the Bar module not found or errors, because the module name will not match the expected GHC.

Since the same rules seem to play in your case to import Tmv.SharedTypes , you want SharedTypes.hs be in the Tmv subdirectory of any base path, so either create another Tmv subdirectory or just --include src for --include .

+3
source

All Articles