Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
A bitmap-friendly XY coordinate.
YX rather than XY since layout is row major (first row sorts before the second, etc.).
Documentation
A 2D coordinate.
YX implements Num
. Integers are converted to their diagonal equivalent
(for example 2
becomes YX 2 2
).
byteStringToArray :: IArray a e => (Char -> Maybe e) -> ByteString -> Either String (a YX e) Source #
Parse newline delimited bytestring into an array.
arrayToByteString :: IArray a e => (e -> Char) -> a YX e -> ByteString Source #
Reverse of byteStringToArray