[Hat] Program Compiles With GHC 6.6 but not Hat

Aditya Siram aditya_siram at hotmail.com
Fri Nov 17 15:24:59 EST 2006


The following program compiles and runs on GHC 6.6 but fails to compile with 
the '-hat' option to hmake. The error message is:
**Begin Output**
hat-trans   HatTest.hs
Wrote Hat/HatTest.hs
ghc-6.6      -c -package hat -o Hat/HatTest.o Hat/HatTest.hs

Hat/HatTest.hs:40:50:
    Ambiguous type variable `a' in the constraint:
      `Integral a'
        arising from use of `htakeodds' at Hat/HatTest.hs:40:50-58
    Probable fix: add a type signature that fixes these type variable(s)
**End Output**

The program source is:

import Prelude

takeodds xs = [ x | x <- xs, (mod x 2) ==0]

main = do { print (takeodds [1 ..7]); }


Thanks...
Deech

_________________________________________________________________
Talk now to your Hotmail contacts with Windows Live Messenger. 
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://get.live.com/messenger/overview



More information about the Hat mailing list