
18 Dec
2008
18 Dec
'08
7:33 a.m.
I think something like this might work:
Prelude GHC.Exts GHC.Word> let W64# x = 0x100000002 in W32# (unsafeCoerce# x)
2
You should get 1 for big-endian and 2 for little-endian.
(Disclaimer: not particularily well-tested.)
-- ryan
On Thu, Dec 18, 2008 at 3:27 AM, Mauricio
Hi,
Is there some way I can check the endianness of the machine my haskell code is running in?
Thanks, MaurĂcio
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe