Real World Haskell Chapter 5

Hi, I have compiled the SimpleJSON.hs file from chapter 5 and from another file attempted to import it. I am getting a could not find module error and the prelude tells me that the locations searched were SimpleJSON.hs and SimpleJSON.lhs. I am running Vista, GHC 6.10.2 Any ideas? tks, PJ

Am Donnerstag 07 Mai 2009 21:18:46 schrieb PJ Fitzpatrick:
Hi, I have compiled the SimpleJSON.hs file from chapter 5 and from another file attempted to import it. I am getting a could not find module error and the prelude tells me that the locations searched were SimpleJSON.hs and SimpleJSON.lhs. I am running Vista, GHC 6.10.2 Any ideas? tks, PJ
If the other file is not in the same directory, you have to tell GHC where to look for it, ghc -ipath/to/SimpleJSONDir:path/to/OtherImport --make UseSimpleJSON or build a package with SimpleJSON in it (using Cabal) and register that, then ghc --make will know where to find it. If the file is in the same directory, it may be an encoding error (or some case-muck-up), but definitely something bad.
participants (2)
-
Daniel Fischer
-
PJ Fitzpatrick