
Hi "hat guys", I have a problem: I try to get hat installed under Mac OS X and so I have it now under /opt/local/ with the help of Darwinport (a rpm file could be installed, or rather forced into this location using a rpm2cpio.sh script). I should say that I also have a ghc installation in fink /sw/bin/ghc (6.2), and *also* one under /opt/local/bin/ (6.4). I have set the GH library path and given the /opt/local precedence in the $PATH variable, so I really hope this is not the problem (well it works for usual Haskell files anyway). Despite this, I cannot get hat up and running. The problem is probably not hat, since the hat-trans compiler seems to work just fine. The problem is to use ghc on the result: $ ghc -v Hat/myresult.hs Using package config file: /opt/local/lib/ghc-6.4/package.conf ... Failed to load interface for `Hat.PreludeBasic': Could not find module `Hat.PreludeBasic': locations searched: Hat/PreludeBasic.hi Hat/PreludeBasic.hi-boot I guess my installation is somehow corrupt, but I wonder if I can manually add Hat to package.conf to avoid this problem. Note that hat resides in /opt/local/bin /opt/local/lib/hat /opt/local/include/hat hmake works fine without hat at the moment, but with the -hat argument I get similarly: $ hmake -hat myfile.hs ... ghc -c -package hat -o ... ghc-6.4: unknown package: hat Many thanks to some help to get 'hat' up and going! Johan Glimming Stockholm University

Johan, Apologies for the delay in your message getting through to the list. It got classified as spam by the filters at haskell.org.
I have a problem: I try to get hat installed under Mac OS X and so I have it now under /opt/local/ with the help of Darwinport (a rpm file could be installed, or rather forced into this location using a rpm2cpio.sh script). I should say that I also have a ghc installation in fink /sw/bin/ghc (6.2), and *also* one under /opt/local/bin/ (6.4).
One possibility is that the Hat libraries were installed for only one of these compilers, but you are now using the other one? You can check whether the library package has been correctly installed using ghc-pkg-6.2 -l ghc-pkg-6.4 -l and noting whether the 'hat' package is listed for each compiler.
Despite this, I cannot get hat up and running. The problem is probably not hat, since the hat-trans compiler seems to work just fine. The problem is to use ghc on the result:
$ ghc -v Hat/myresult.hs
OK, a second potential problem is that the hat package may be "hidden" rather than "exposed". In the listing given by ghc-pkg-6.4, a hidden package is denoted by parentheses arond its name. If so, you can either name the package explicitly to the compiler; ghc -v -package hat Hat/myresult.hs or set it to be exposed by default: ghc-pkg-6.4 expose hat
$ hmake -hat myfile.hs ... ghc -c -package hat -o ... ghc-6.4: unknown package: hat
This does look like Hat is only installed for ghc-6.2. If so, then I suggest you install it a second time, from source, with ghc-6.4 on your PATH. Then you should be able to use it with both versions of the compiler. The manual build process (without darwinports) is very straightforward: ./configure --prefix=... make (sudo) make install Regards, Malcolm
participants (2)
-
Johan Glimming
-
Malcolm Wallace