úÎ0E-ô     $Region quadtrees with Lens support. #Rank 2 Types, Scoped Type Variables Experimental!Ashley Moni <y30099923@gmail.com>SafeEach ! is a tuple of an element from a  and the   it subtends. 7Rectangular area, represented by a tuple of four Ints. =They correspond to (X floor, Y floor, X ceiling, Y ceiling). BThe co-ordinates are inclusive of all the rows and columns in all  four Ints. regionArea (x, y, x, y) == 1The eponymous data type. 7 is itself a wrapper around an internal tree structure C along with spatial metadata about the boundaries and depth of the  2D area it maps to. *Tuple corresponds to (X, Y) co-ordinates. 7Lens for accessing and manipulating data at a specific  location. This is simply  and  wrapped into a lens. /Getter for the value at a given location for a . /Setter for the value at a given location for a . "This automatically compresses the  nodes if possible with  the new value.  Checks if a  is outside the boundaries of a . Dimensions of a , as an Int pair. #Cleanup function for use after any . When elements of a  are modified by  (or  the . lens), it automatically compresses identical 1 adjacent nodes into larger ones. This keeps the  from  bloating over constant use. , does not do this. If you wish to treat the   as a , you should compose this 9 function after to collapse it down to its minimum size.  Example:      $  fn tree   ; This particular example is reified in the function below. tmap is simply  with   applied after. 'tmap fn tree == fuseTree $ fmap fn tree Takes a list of *s and then decomposes them into a list of * all their elements, properly weighted by  size. Returns a list of s. The block equivalent of  .  Decomposes a  into its constituent  s, before  folding a & consuming function over all of them. =Simple helper function that lets you calculate the area of a  , usually for  purposes. 'Does the region contain this location?  s a list of the  ' s elements. s a list of the  ' s elements.  s a list of the s of a . s a list of the s of a . Constructor that generates a  of the given dimensions, - with all cells filled with a default value. 4Generates a newline delimited string representing a  as  a 2D block of characters. Note that despite the word ! in the function name, this does  not    the  . It pretty prints it. The name  is simply a mnemonic for its  -> String behaviour. As  above, but also prints it. + (Length, Width) !"#$ % & '()(Length, Width) Initial element to fill )Function to generate characters for each   element. )Function to generate characters for each   element. *+,   $ !"#$ % & '()*+,-   !"#$#% &'()*+,-./0123456789:QuadTree-0.10.0 Data.QuadTree Control.MonadfmapFunctor Data.FoldabletoList Data.List replicatefilterTextshowTileRegionQuadTreeLocation atLocation getLocation setLocation outOfBoundstreeDimensionsfuseTreetmapexpandtile foldTiles regionAreainRegion filterTree sortTreeBy filterTiles sortTilesBymakeTreeshowTree printTreebasesortByGHC.ShowQuadrantNodeLeafWrapper wrappedTree treeLength treeWidth treeDepth offsetIndexoffsetsfuseonQuads fuseQuadsfoldTree treeRegion boundariesregionIntersection$fFunctorQuadrant$fFoldableQuadTree$fFunctorQuadTree