-- import System.IO
f589_1 = do
p_a <- addr a
b
<- addr
(3.45 :: Float) p_b <- addr b
prn "a" a
prn "p_a" p_a
prn "b" b
prn "p_b" p_b
free a >> free p_a >> free b >> free p_b
where
addr a
= malloc
>>= \p
-> poke p a
>> return p
prn x i = do
v <- peek i
f589_2 = do
let c = 'A'
p <- malloc
poke p c
peek p >>= poke p . chr . (+2) . ord
free p
main = -- hSetEncoding stdout utf8 >>
f589_1 >> f589_2
aW1wb3J0IERhdGEuQ2hhcgppbXBvcnQgRm9yZWlnbgotLSBpbXBvcnQgU3lzdGVtLklPCgpmNTg5XzEgOjogSU8gKCkKZjU4OV8xID0gZG8KICAgIGEgPC0gYWRkciAoMTIgOjogSW50KQogICAgcF9hIDwtIGFkZHIgYQogICAgYiA8LSBhZGRyICgzLjQ1IDo6IEZsb2F0KQogICAgcF9iIDwtIGFkZHIgYgogICAgcHJuICJhIiBhCiAgICBwcm4gInBfYSIgcF9hCiAgICBwcm4gImIiIGIKICAgIHBybiAicF9iIiBwX2IKICAgIGZyZWUgYSA+PiBmcmVlIHBfYSA+PiBmcmVlIGIgPj4gZnJlZSBwX2IKICAgIHdoZXJlCiAgICAgIGFkZHIgYSA9IG1hbGxvYyA+Pj0gXHAgLT4gcG9rZSBwIGEgPj4gcmV0dXJuIHAKICAgICAgcHJuIHggaSA9IGRvCiAgICAgICAgICB2IDwtIHBlZWsgaQogICAgICAgICAgcHV0U3RyTG4gJCB4ICsrICLjga7jgqLjg4njg6zjgrnjga/jgIEiICsrIHNob3cgaQogICAgICAgICAgcHV0U3RyTG4gJCB4ICsrICLjga7lgKTjga/jgIEiICsrIHNob3cgdgoKZjU4OV8yIDo6IElPICgpCmY1ODlfMiA9IGRvCiAgICBsZXQgYyA9ICdBJwogICAgcCA8LSBtYWxsb2MKICAgIHBva2UgcCBjCiAgICBwZWVrIHAgPj49IHB1dFN0ckxuIC4gKDpbXSkKICAgIHBlZWsgcCA+Pj0gcG9rZSBwIC4gY2hyIC4gKCsyKSAuIG9yZAogICAgcGVlayBwID4+PSBwdXRTdHJMbiAuICg6W10pCiAgICBmcmVlIHAKCm1haW4gOjogSU8gKCkKbWFpbiA9IC0tIGhTZXRFbmNvZGluZyBzdGRvdXQgdXRmOCA+PgogICAgICAgZjU4OV8xID4+IGY1ODlfMgo=