[Hat] hat installation problem

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Feb 14 10:01:22 EST 2006


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


More information about the Hat mailing list