
23 Dec
2005
23 Dec
'05
6:58 a.m.
Hello Joel, Thursday, December 22, 2005, 7:27:17 PM, you wrote: JR> #ifdef BIG_ENDIAN JR> swap16 v = (v `shiftR` 8) .|. (v `shiftL` 8) JR> #else JR> swap16 v = v JR> #endif afaik, your code anyway will not work on non-x86 architectures, because your `storable` definition use unaligned reads which are not supported outside x86 world and about ":+:" - read "Derivable type classes [http://research.microsoft.com/~simonpj/Papers/derive.ps.gz]" and "7.11. Generic classes" of ghc manual -- Best regards, Bulat mailto:bulatz@HotPOP.com