[Haskell-cafe] hugs, ghc portability

Vadim Zaliva lord at crocodile.org
Thu Aug 19 16:49:02 EDT 2004


I have following code:

import Data.Bits

xcomp :: Int -> Int -> Int
xcomp a m = (xor a (complement m))

which compiles fine under GHC. However hugs does not like
it, since they intentionally did not do:

--instance Bits Int

How can I resolve this to have this code work under GHC
and hugs?


"La perfection est atteinte non quand il ne reste rien a ajouter, mais
quand il ne reste rien a enlever."  (Antoine de Saint-Exupery)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2388 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20040819/835ffc11/smime.bin

More information about the Haskell-Cafe mailing list