3
votes

I have a module "Dictionary", declared in a file "Dictionary.hs".

in the same directory i have a file "Def.hs" which imports Dictionary

here's the error i get

... /edsl/Def.hs:4:7: Could not find module `Dictionary': locations searched: Dictionary.hs Dictionary.lhs

... /edsl/Dictionary.hs is there. it's permissions are such that it can be written to or read from by anyone.

i really have no idea why i can't import. i'm using ghc 6.12.1 on mac os x 10.5.8

edit here's the relevant code

in Dictionary.hs

module Dictionary where
...

and in in Def.hs

module Def where
import Control.Exception
import Data.Dynamic
import Dictionary
...

am i just defining the module incorrectly? i want to export all symbols.

1
Seeing some code would be helpful. - sepp2k
can you provide the line where you import Def? is that :l edsl/Def.hs in ghci? - yairchu
i just load Def into ghci with: ghci edsl/Def.hs. i was under the belief that loading a file in ghci searched for and built all dependancies before building the file to load. - david pasquinelli

1 Answers

2
votes

i just found the problem. i'm using komodo edit, and the command the i created to load a file into ghci doesn't change the working directory.

doh.