I have a problem with my project structure:
pic-analysis-0.1/AlgTop/Data.hs
Functions.hs
PNGModify.hs
Main.hs
Data.hs:
module AlgTop.Data (…) where
Functions.hs:
module AlgTop.Functions (…) where
import AlgTop.Data
The AlgTop.Functions module doesn't find AlgTop.Data.
I compared my project structure approach with that of ansi-terminal on Hackage (see below), but I couldn't spot any difference. What am I doing wrong?
ansi-terminal-xxx/System/Console/ANSI/Common.hs
/Unix.hs
/…
Common.hs:
module System.Console.ANSI.Common where
Unix.hs:
module System.Console.ANSI.Unix (…) where
import System.Console.ANSI.Common
Error message:
[...]
*** Chasing dependencies:
Chasing modules from: *Functions.hs
Functions.hs:9:8:
Could not find module `AlgTop.Data':
locations searched:
AlgTop/Data.hs
AlgTop/Data.lhs
[...]
If you are using ghci it is probably that you need to :set -i/.../pic-analysis-0.1. That is, include the root directory of your module hierarchy.
No need to set anything. Just cd into the root directory before invoking GHCi:
ghci AlgTop/Functions.hs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With