!dqY      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ (C) 2018-18 Edward Wastell!MIT -style (see the file LICENSE)!Edward Wastell <ed@wastell.co.uk> provisionalNone &'.1SUVXk sized-gridXMagic is stole from Constraints, and I don't really understand it, but it is needed for  sized-gridA type constraint for getting SingI sized-gridA singleton type for Bools sized-gridZGive a runtime representation of a type level number being less than or equal than another sized-grid A Dict prove that m - 1 + 1 is m sized-gridAlso don't understand sized-gridARuntime proof that n - m is an insance of KnownNat if n and m are None&',-.1=>?@AHSUVXk sized-gridlAn Ordinal can only hold m different values, ususally corresponding to 0 .. m - 1. We store it here using a L of a type level number and use constraints to keep the required invariants.zDesprite represeting a number, Ordinal is not an instance of Num and many functions (such as negate) would only be partial sized-gridEConvert a normal integral to an ordinal. If it is outside the range ( 0or= m), Nothing is returned. sized-grid&Transform an ordinal to a given number  sized-grid9Convert between an ordinal and a usual number. This is a Prism as it may fail as Oridnals# can only exist in a certain range.  None-./8=>?HSUVXk( sized-gridSometimes it useful to work with Coords of type *, not Nat -> *. This is away of doing so. | | It should be autogenerated for all valid instances of  sized-gridKEverything that can be uses as a Coordinate. The only required function is  and the type instance of  CoordSized(: the rest can be derived automatically. sized-gridWAs each coord represents a finite number of states, it must be isomorphic to an Ordinal sized-grid#The origin. If c is an instance of , this should be mempty sized-grid Retrive a  of the size sized-grid'The largest possible number expressable sized-gridThe maximum value of a coord" sized-grid2Enumerate all possible values of a coord, in order ! " ! "None-.1=>?HMUVXk+% sized-grid8A coordinate with periodic boundaries, as if on a taurus%&'%&'None .1>HMUVXk,}6 sized-grid$A coordinate that clamps its numbers678678None%-.7=>?@AHSUVXghk@M sized-grid2All Diffs of the members of the list must be equalN sized-gridMThe number of elements a coord can have. This is equal to the product of the  CoordSized of each elementO sized-gridApply d to each element of a type level list. This is required as type families can't be partially applied.P sized-gridOThe type of difference between two coords. A n-dimensional coord should have a  of an n-tuple of Integers . We use F and our 1-tuple. Unfortuantly, each instance is manual at the moment.Q sized-gridA multideminsion coordinateT sized-gridLength of a type level listY sized-gridaGet the first element of a coord. Thanks to type level information, we can write this as a total Z sized-gridA  into the the tail of Q[ sized-grid-Turn a single element into a one dimensional Q\ sized-gridAdd a new element to a Q#. This increases the dimensionality] sized-grid%Generate all possible coords in order^ sized-grid Convert a Q to its position in a vector_ sized-gridECalculate the Moore neighbourhood around a point. Includes the center` sized-gridJCalculate the von Neuman neighbourhood around a point. Includes the centera sized-grid$Swap x and y for a coord in 2D spaceb sized-gridThe zero position for a coordGHIJKLMNOPQRSTUVWXYZ[\]^_`abTQRSWVUXYZ[\PO]N^M_`abKLIJGHV5None./14567=>?@ACHMSUVXhkNE{ sized-grid2A Constraint that all grid sizes are instances of | sized-gridGiven a grid type, give back a series of nested lists repesenting the grid. The lists will have a number of layers equal to the dimensionality.} sized-grid/All but the first elements of a type level list~ sized-grid&The first element of a type level list sized-gridA multi dimensional sized grid sized-grid Convert a vector into a list of Vector:s, where all the elements of the list have the given size. sized-grid~Convert a grid to a series of nested lists. This removes type level information, but it is sometimes easier to work with lists sized-gridrConvert a series of nested lists to a grid. If the size of the grid does not match the size of lists this will be yz{|}~~}|{yzNone 456=>?@AMS! sized-grid Similar to ], but this has a focus on a certain square. Becuase of this we loose some instances, such as , but we gain a  and R instance. We can convert between a focused and unfocused list using facilites in IsGrid None =>?@ACSXW sized-gridConversion between  and  and access grids at a Q sized-gridPGet the element at a grid location. This is a lens because we know it must exist sized-grid&Convert to, or run a function over, a  sized-grid&Convert to, or run a function over, a NoneX=W  !"%&'678GHIJKLMNOPQRSTUVWXYZ[\]^_`abyz{|}~      !"#$%&'()*+,-./01123456789:;<=>?@AABCDEFGHIJKLMNOPQRSTUVWXYZ[[\]^_`abcdefghijklmnopqrstuvwxyz{|}~       )sized-grid-0.2.0.1-13S2LxFyaLj8fVZ02bNPgR SizedGridSizedGrid.OrdinalSizedGrid.Coord.ClassSizedGrid.Coord.PeriodicSizedGrid.Coord.HardWrapSizedGrid.CoordSizedGrid.Grid.GridSizedGrid.Grid.FocusedSizedGrid.Grid.ClassSizedGrid.Internal.Type'sop-core-0.5.0.0-9cKeYbaA4A8Gi6ExvPweAMData.SOP.BasicFunctorsIData.SOP.ConstraintComposeSListIAllOrdinal numToOrdinal ordinalToNumstrengthenOrdinal weakenOrdinal_Ordinal$fFromJSONKeyOrdinal$fToJSONKeyOrdinal$fFromJSONOrdinal$fToJSONOrdinal $fEnumOrdinal$fBoundedOrdinal$fRandomOrdinal $fOrdOrdinal $fEqOrdinal $fShowOrdinal IsCoordLiftedCoordContainerCoordNatIsCoord asOrdinal zeroPosition sCoordSized maxCoordSizemaxCoord asSizeProxy weakenIsCoordstrengthenIsCoord allCoordLike$fIsCoordOrdinal$fIsCoordLiftedcPeriodic unPeriodic$fAffineSpacePeriodic$fAdditiveGroupPeriodic$fMonoidPeriodic$fSemigroupPeriodic$fIsCoordPeriodic$fEnumPeriodic $fEqPeriodic$fShowPeriodic $fOrdPeriodic$fFromJSONKeyPeriodic$fFromJSONPeriodic$fToJSONKeyPeriodic$fToJSONPeriodic$fRandomPeriodicHardWrap unHardWrap$fAffineSpaceHardWrap$fMonoidHardWrap$fSemigroupHardWrap$fIsCoordHardWrap $fEqHardWrap$fShowHardWrap $fOrdHardWrap$fFromJSONKeyHardWrap$fToJSONKeyHardWrap$fFromJSONHardWrap$fToJSONHardWrap$fBoundedHardWrap$fEnumHardWrap$fRandomHardWrapStrengthenCoordstrengthenCoord WeakenCoord weakenCoord AllSizedKnown sizeProof AllDiffSame MaxCoordSizeMapDiff CoordDiffCoordunCoordLength EmptyCoord:| coordSplit _WrappedCoord coordHead coordTail singleCoord appendCoordallCoord coordPosition moorePointsvonNeumanPoints tranposeCoord zeroCoord$fField5CoordCoordee'$fField4CoordCoorddd'$fField3CoordCoordcc'$fField2CoordCoordbb'$fField1CoordCoordaa' $fRandomCoord$fAdditiveGroupCoord $fMonoidCoord$fSemigroupCoord$fFromJSONCoord $fToJSONCoord $fShowCoord $fOrdCoord $fEqCoord$fAffineSpaceCoord$fAllSizedKnown:$fAllSizedKnown[]$fWeakenCoord::$fWeakenCoord[][]$fStrengthenCoord::$fStrengthenCoord[][]$fGenericCoordShrinkableGrid shrinkGridAllGridSizeKnown CollapseGridTailHeadGridunGridsplitVectorBySize collapseGrid gridFromList transposeGrid splitGrid combineGridcombineHigherDimdropGridtakeGridsplitHigherDim mapLowerDim$fTraversableWithIndexCoordGrid$fFoldableWithIndexCoordGrid$fFunctorWithIndexCoordGrid$fRepresentableGrid$fDistributiveGrid $fMonadGrid$fApplicativeGrid$fFromJSONGrid $fToJSONGrid$fShrinkableGrid:::$fShrinkableGrid[][][]$fEqGrid $fShowGrid $fFunctorGrid$fFoldableGrid$fTraversableGrid $fEq1Grid $fShow1Grid $fGenericGrid FocusedGrid focusedGridfocusedGridPosition$fComonadStoreCoordFocusedGrid$fComonadFocusedGrid$fFunctorFocusedGrid$fFoldableFocusedGrid$fTraversableFocusedGridIsGrid gridIndexasGrid asFocusedGrid$fIsGridcsFocusedGrid$fIsGridcsGridMagictakeNatSBoolISBool sLessThan takeAddIsIdmagicsBoolSFalseSTruebase Data.ProxyProxyGHC.BaseMonoid(vector-space-0.16-L887HCBooFh5NOrjj7OnBVData.AffineSpaceDiffData.Functor.IdentityIdentity lens-4.18-HI3642v7827JTf0vyfqsuPControl.Lens.TypeLens GHC.TypeNatsKnownNat GHC.MaybeNothing Applicative$comonad-5.0.5-1t7DDbZbcMSAgTS70WFpTSControl.ComonadComonadControl.Comonad.Store.Class ComonadStore