
On Mon, Jun 21, 2004 at 05:48:09PM -0700, Fergus Henderson wrote:
I am trying to get Hat working on a reasonably large and complicated project. Unfortunately it doesn't work. I have cut down the code which triggers the problem to the following simple test case:
| bash$ cat Foo/List.hs | module Foo.List where | | class List a b where | foo :: a -> b | | main :: IO () | main = return () | | bash$ hmake -hat Foo/List | hat-trans Foo/List.hs | Creating directories Hat Hat/Foo | Wrote Hat/Foo/List.hs | /usr/bin/haskell-compiler -c -package hat -o Hat/Foo/List.o Hat/Foo/List.hs | | Hat/Foo/List.hs:1: | Ambiguous occurrence `List' | It could refer to either `Hat.Hat.List', imported from Hat.Prelude at Hat/Foo/List.hs:30 | or `Hat.Foo.List.List', defined at Hat/Foo/List.hs:32
I am using hat-2.02.8 with ghc 6.2 on Debian Linux.
Hi Fergus, As a temporary fix, that _might_ get you past this bug, you can modify the file Hat/Foo/List.hs to say: import Hat.Prelude hiding (List) instead of import Hat.Prelude on about line 30. There might be cases where this fails to fix the problem though. Cheers, Bernie.