
24 Jun
2009
24 Jun
'09
9:55 a.m.
I'm using tuples to index into a `UArray` created like this: fromList :: [(Word16, Word16)] -> UArray (Word16, Word16) Bool fromList list = runSTUArray $ do arr <- empty return arr empty :: ST s (STUArray s (Word16, Word16) Bool) empty = newArray ((0,0), (0xFFFF,0xFFFF)) False You'll notice this example doesn't do much; I'm not able to get much mileage so far. For example: > Array16Bit.fromList [(1,2), (2,3)] array ((0,0),(65535,65535)) [((0,0),*** Exception: Error in array index What do I need to do to debug this? -- Jason Dusek