The functions getX and setX in Foreign.Memory take an offset as a
Word.word. I'm finding that it is possible to have a negative offset by
negating the word offset, e.g.
get8 (p, ~ 0w1)
Is that guaranteed work generally?
Given that
Word.wordSize = 63
SysWord.wordSize = 64
I wouldn't have expected this to work for get8/set8 but it does.
Phil
P.S. My efforts to inspect the source didn't get far as these functions
go straight to run-time calls and I'm not familiar with internal
representations in Poly/ML...
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml