| Safe Haskell | None | 
|---|---|
| Language | Haskell98 | 
Data.Array.Comfort.Shape
- class C sh where
- newtype ZeroBased n = ZeroBased {- zeroBasedSize :: n
 
- newtype OneBased n = OneBased {- oneBasedSize :: n
 
- data Range n = Range {}
- data Shifted n = Shifted {- shiftedOffset, shiftedSize :: n
 
- data sh0 :+: sh1 = sh0 :+: sh1
Documentation
Minimal complete definition
indices, size, (sizeOffset | offset), inBounds
Methods
indices :: sh -> [Index sh] Source #
offset :: sh -> Index sh -> Int Source #
uncheckedOffset :: sh -> Index sh -> Int Source #
inBounds :: sh -> Index sh -> Bool Source #
uncheckedSize :: sh -> Int Source #
sizeOffset :: sh -> Index sh -> (Int, Int) Source #
uncheckedSizeOffset :: sh -> Index sh -> (Int, Int) Source #
Instances
| C () Source # | |
| Integral n => C (Shifted n) Source # | |
| Ix n => C (Range n) Source # | |
| Integral n => C (OneBased n) Source # | |
| Integral n => C (ZeroBased n) Source # | |
| (C sh0, C sh1) => C (sh0, sh1) Source # | Row-major composition of two dimensions. | 
| (C sh0, C sh1) => C ((:+:) sh0 sh1) Source # | |
| (C sh0, C sh1, C sh2) => C (sh0, sh1, sh2) Source # | |
ZeroBased denotes a range starting at zero and has a certain length.
Constructors
| ZeroBased | |
| Fields 
 | |
OneBased denotes a range starting at zero and has a certain length.
Constructors
| OneBased | |
| Fields 
 | |
Range denotes an inclusive range like those of the Haskell 98 standard Array type from the array package. E.g. the shape type (Range Int32, Range Int64) is equivalent to the ix type (Int32, Int64) for Arrays.
Shifted denotes a range defined by the start index and the length.
Constructors
| Shifted | |
| Fields 
 | |