Satnam Singh wrote:
>
> I attach a set of Haskell files which compile fine with ghc (make kcm or
> make motkcm) but Hugs failed to load them.
> It incorrectly complains about an known function in the export list.
>
> Is this a bug? Is there a workaround?
>
> This is stopping me from working with Hugs :-(
Panic no more!
You've been bitten by the "where-is-the-rest-of-the-program" bug.
You have a definition:
kcm_top dataSigned k kSize dataSize
= do clk <- globalClock "c"
d <- inputVec "a" (bit_vector (dataSize-1) downto 0)
p <- splitKCM dataSigned k kSize d
outputVec p "prod" (bit_vector (dataSize+kSize-1) downto 0)
where
[.. rest of program...]
and the 'where' captured the rest of the program in the inner scope,
not allowing the to level bindings to take place.
To fix: remove where, or use 'where {}' if you explicitly need an
empty where.
It may, however, still be a bug in Hugs, I think empty where clauses
(even if a bit silly) are allowed.
Simon Marlow - care to comment? I'll put a summary into the hugs gotya page.
Andy Gill