
7 Oct
2005
7 Oct
'05
2:48 p.m.
This code hangs for me for whatever reason when I run it at the ghci prompt. It does not matter whether I load it from a file or type it in. On Oct 7, 2005, at 2:50 PM, Benjamin Franksen wrote:
You would probably want to wrap/unwrap values (using BigEndian/LittleEndian) just before/after calling poke/peek, like this:
\begin{code} main = do ptr_x <- new (BigEndian(1::Int)) (BigEndian x) <- peek ptr_x poke ptr_x (BigEndian 2) -- poke ptr_x (LittleEndian 3) \end{code}