h$+#      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                           Safe-InferredV  Safe-InferredNone comfort-array(Row-major composition of two dimensions.Shape.indices (Shape.ZeroBased (3::Int) :+: Shape.Range 'a' 'c')4[Left 0,Left 1,Left 2,Right 'a',Right 'b',Right 'c'] comfort-array is a shape, where the indices wrap around at the array boundaries. E.g.let shape = Shape.Cyclic (10::Int) in Shape.offset shape (-1) == Shape.offset shape 9This also means that there are multiple indices that address the same array element.%Shape.indices (Shape.Cyclic (7::Int))[0,1,2,3,4,5,6] comfort-arrayShape.indices $ Shape.Triangular Shape.Upper $ Shape.ZeroBased (3::Int)%[(0,0),(0,1),(0,2),(1,1),(1,2),(2,2)]Shape.indices $ Shape.Triangular Shape.Lower $ Shape.ZeroBased (3::Int)%[(0,0),(1,0),(1,1),(2,0),(2,1),(2,2)] comfort-array is like a Cartesian product, but it is statically asserted that both dimension shapes match.5Shape.indices $ Shape.Cube $ Shape.ZeroBased (2::Int)[(0,0,0),(0,0,1),(0,1,0),(0,1,1),(1,0,0),(1,0,1),(1,1,0),(1,1,1)] comfort-array is like a Cartesian product, but it is statically asserted that both dimension shapes match.7Shape.indices $ Shape.Square $ Shape.ZeroBased (3::Int)7[(0,0),(0,1),(0,2),(1,0),(1,1),(1,2),(2,0),(2,1),(2,2)] comfort-array has an  instance that is based on the storage order in memory. This way, you can put  values in a  or use them as keys in a  even if Index sh has no 1 instance. The downside is, that the ordering of DeferredIndex sh may differ from the one of Index sh. comfort-arrayThis data type wraps another array shape. Its index type is a wrapped 3. The advantages are: No conversion forth and back  and Index sh. You can convert once using < and = whenever you need your application specific index type. No need for e.g. Storable (Index sh) , because  is already  . You get 0 and -# instances without the need for an 1 type. The disadvantage is: A deferred index should be bound to a specific shape, but this is not checked. That is, you may obtain a deferred index for one shape and accidentally abuse it for another shape without a warning.Example::{let sh2 = (Shape.ZeroBased (2::Int), Shape.ZeroBased (2::Int)) inlet sh3 = (Shape.ZeroBased (3::Int), Shape.ZeroBased (3::Int)) in0(Shape.offset sh3 $ Shape.indexFromOffset sh2 3,$ Shape.offset (Shape.Deferred sh3) $0 Shape.indexFromOffset (Shape.Deferred sh2) 3):}(4,3) comfort-array2 denotes a shape of fixed size that is defined by  and 3 methods. For correctness it is necessary that the  and  instances are properly implemented. Automatically derived instances are fine.?Shape.indices (Shape.Enumeration :: Shape.Enumeration Ordering) [LT,EQ,GT] comfort-array; denotes a range defined by the start index and the length.+Shape.indices (Shape.Shifted (-4) (8::Int))[-4,-3,-2,-1,0,1,2,3] comfort-array 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.)Shape.indices (Shape.Range (-5) (5::Int))[-5,-4,-3,-2,-1,0,1,2,3,4,5]3Shape.indices (Shape.Range (-1,-1) (1::Int,1::Int))=[(-1,-1),(-1,0),(-1,1),(0,-1),(0,0),(0,1),(1,-1),(1,0),(1,1)]# comfort-array#: denotes a range starting at one and has a certain length.'Shape.indices (Shape.OneBased (7::Int))[1,2,3,4,5,6,7]& comfort-array&; denotes a range starting at zero and has a certain length.(Shape.indices (Shape.ZeroBased (7::Int))[0,1,2,3,4,5,6]. comfort-arrayIt should hold 'indexFromOffset sh k == indices sh !! k , but . should generally be faster.E comfort-array?@A89:01234657-./+,)*&'(;#$% !"<=  >?@A5577NoneNone   NoneNone comfort-arrayWe must restrict  to + because of >. Because the shape is static, we do not need a size check in .9 None9  Safe-InferredNoneNone;9 NoneNone$  Noneu None  comfort-array-\x -> Array.singleton x ! () == (x::Word16) comfort-array\(QC.NonNegative n) (Array16 x) -> x == Array.mapShape (Shape.ZeroBased . Shape.size) (Array.append (Array.take n x) (Array.drop n x)) comfort-array\(QC.NonNegative n) (Array16 x) -> x == Array.mapShape (Shape.ZeroBased . Shape.size) (Array.append (Array.take n x) (Array.drop n x)) comfort-array\(Array16 x) (Array16 y) -> let xy = Array.append x y in x == Array.takeLeft xy && y == Array.takeRight xy comfort-array\(Array16 x) (Array16 y) (Array16 z) -> let xyz = Array.append x $ Array.append y z in y == Array.takeCenter xyz comfort-array8\(Array16 xs) -> Array.sum xs == sum (Array.toList xs) comfort-array\(Array16 xs) -> Array.product xs == product (Array.toList xs) None" comfort-array-It is a checked error if the vector is empty.forAllNonEmpty $ \xs -> Array.minimum xs ==? minimum (Array.toList xs) comfort-array-It is a checked error if the vector is empty.forAllNonEmpty $ \xs -> Array.maximum xs ==? maximum (Array.toList xs) comfort-arrayforAllNonEmpty $ \xs -> Array.limits xs ==? (Array.minimum xs, Array.maximum xs)((9   !!""#$%%&'(()**+,,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~:G4                                          5 6 0 1  *comfort-array-0.4.1-Jr7WmPnzZvA7bHPbvVsxdxData.Array.Comfort.ShapeData.Array.Comfort.Shape.TestData.Array.Comfort.ContainerData.Array.Comfort.Boxed+Data.Array.Comfort.Storable.Mutable.Private#Data.Array.Comfort.Storable.Private#Data.Array.Comfort.Storable.Mutable-Data.Array.Comfort.Storable.Unchecked.Monadic%Data.Array.Comfort.Storable.UncheckedData.Array.Comfort.StorableData.Array.Comfort.Shape.Set Data.Array.Comfort.Shape.UtilityData.Array.Comfort.Check"Data.Array.Comfort.Boxed.Unchecked"Data.Array.Comfort.Storable.Memory-Data.Array.Comfort.Storable.Mutable.Unchecked:+:Cyclic cyclicSizeUpperTriangularLowerTriangular TriangulartriangularParttriangularSizeUpperLowerCubecubeSizeSquare squareSize DeferredIndexDeferred EnumerationShifted shiftedOffset shiftedSizeRange rangeFromrangeToOneBased oneBasedSize ZeroBased zeroBasedSizeZeroStaticstatic InvIndexedindexFromOffsetuncheckedIndexFromOffsetIndexedIndexindicesoffsetuncheckedOffsetinBounds sizeOffsetuncheckedSizeOffsetCsize uncheckedSizezeroBasedSplit deferIndex revealIndexlowerTriangularupperTriangular triangleSize triangleRoot$fC(,,)$fC(,) $fCTagged$fCMap$fCSet$fC() $fIndexed(,,) $fIndexed(,)$fIndexedTagged $fIndexedMap $fIndexedSet $fIndexed()$fInvIndexed(,,)$fInvIndexed(,)$fInvIndexedTagged$fInvIndexedMap$fInvIndexedSet$fInvIndexed() $fStatic(,,) $fStatic(,)$fStaticTagged $fStatic() $fStaticZero$fCZero$fInvIndexedZeroBased $fCZeroBased$fStorableZeroBased$fNFDataZeroBased$fApplicativeZeroBased$fFunctorZeroBased$fInvIndexedOneBased $fCOneBased$fStorableOneBased$fNFDataOneBased$fApplicativeOneBased$fFunctorOneBased$fStorableRange$fInvIndexedRange$fIndexedRange$fCRange $fNFDataRange$fFunctorRange$fStorableShifted$fInvIndexedShifted$fIndexedShifted $fCShifted$fNFDataShifted$fFunctorShifted$fIndexedOneBased$fIndexedZeroBased$fStorableEnumeration$fStaticEnumeration$fInvIndexedEnumeration$fIndexedEnumeration$fCEnumeration$fNFDataEnumeration$fStaticDeferred $fCDeferred$fNFDataDeferred$fStorableDeferredIndex$fInvIndexedDeferred$fIndexedDeferred$fInvIndexedSquare$fIndexedSquare $fCSquare$fStorableSquare$fNFDataSquare$fApplicativeSquare$fFunctorSquare$fInvIndexedCube $fIndexedCube$fCCube$fStorableCube $fNFDataCube$fApplicativeCube $fFunctorCube$fTriangularPartUpper$fTriangularPartLower$fStaticTriangular$fInvIndexedTriangular$fIndexedTriangular $fCTriangular$fEqTriangular$fNFDataTriangular$fInvIndexedCyclic$fIndexedCyclic $fCCyclic$fStorableCyclic$fNFDataCyclic$fApplicativeCyclic$fFunctorCyclic $fStatic:+:$fInvIndexed:+: $fIndexed:+:$fC:+: $fNFData:+:$fEq:+: $fShow:+: $fEqCyclic $fShowCyclic$fShowTriangular $fEqUpper $fShowUpper $fEqLower $fShowLower$fEqCube $fShowCube $fEqSquare $fShowSquare$fEqDeferredIndex$fOrdDeferredIndex$fShowDeferredIndex $fEqDeferred$fShowDeferred$fEqEnumeration$fShowEnumeration $fEqShifted $fShowShifted $fEqRange $fShowRange $fEqOneBased$fShowOneBased $fEqZeroBased$fShowZeroBased$fEqZero $fOrdZero $fShowZerotestsEqShapeeqShapeNFShapernfShapeShape shapeSizefromListtoShape$fCT$fCT0$fCT1$fC[]$fCShape $fNFShapeT $fNFShapeMap $fNFShapeT0 $fNFShapeT1 $fNFShape[] $fNFDataShape $fEqShapeT $fEqShapeMap $fEqShapeT0 $fEqShapeT1 $fEqShape[] $fEqShape $fShowShape $fShowShape0 $fShowShape1 $fShowShape2ArraytoListvectorFromList replicatemapshapereshapemapShapefromMaptoMap fromContainer toContainer!zipWith// accumulatetoAssociationsfromAssociationsIOArraySTArraybuffercopycreatecreateWithSizecreateWithSizeAndResult unsafeCreateunsafeCreateWithSizeunsafeCreateWithSizeAndResultunsafeArrayIOToPrimshow withArrayPtrwithPtrreadwriteupdatenewfreezethaw unsafeFreeze unsafeThaw $fEqArray $fNFDataArray $fShowArray mapWithIndex singletonappendtakedroptakeLeft takeRightsplit takeCentersumproductfoldlsample fromBoxedtoBoxedminimummaximumfoldl1limitsfoldMap argMinimum argMaximumerrorIndexFromOffsetghc-prim GHC.ClassesOrdcontainers-0.6.2.1Data.Set.InternalSetData.Map.InternalMap GHC.TypesIntbaseForeign.StorableStorableGHC.EnumEnumBounded combineOffsetcombineSizeOffset$fApplicativeArrayGHC.Base Applicativepure<*> toListLazy