úÎ0\.%)      !"#$%&'(portableunstableclaudiusmaximus@goto10.orgAn axis-aligned rectangle with ) coordinates.  Invariant:  8 westEdge r <= eastEdge r && southEdge r <= northEdge r <For substitution tilings that contain irrational lengths and/ or scale 9 factors, the intention is that the implementations of    and  3 provide reasonably tight bounds, within a percent H or two, say, while the data type maintains full precision internally 2 (perhaps using algebraic field extensions over )). ?Substitution tilings. Instances must obey the following laws:   parent root == Nothing - all (== Just t) . map parent . children $ t  t `inside` exterior t  t `encloses` interior t ! interior t `insideR` exterior t # t `inside` r ==> t `overlaps` r % t `encloses` r ==> t `overlaps` r ) t `overlaps` r ==> not (t `outside` r) E t `encloses` r && n >= 0 ==> not $ any (`outside` r) (tile t r n) (Minimal complete definition: all except .  The largest tile to start from.  The smaller children of a tile. The unique parent of a tile. /A rectangle that completely encloses the tile. 5A rectangle that is completely enclosed by the tile. 2Test if a rectangle completely encloses the tile. 8Test if a rectangle is completely enclosed by the tile. :Test if a rectangle is completely disjoint from the tile. 3Test if a rectangle has any overlap with the tile. =Generate a tiling that completely fills the given rectangle. Preconditions:  t `encloses` r  n >= 0 Default implementation for . CCreate a valid rectangle, sorting the edges to meet the invariant. x0 x1 y0 y1  rectangle BCheck if a rectangle is inside another rectangle. The comparison 8 is not strict, so that a rectangle is inside itself. ICheck if a rectangle is disjoint from another rectangle. The comparison F is strict, so that neighbouring rectangles that share an edge will  not be outside each other. FCheck if a rectangle overlaps with another rectangle. The comparison E is not strict, so that neighbouring rectangles that share an edge  will overlap each other.      portableunstableclaudiusmaximus@goto10.orgWhich quadrant. A square tile.  !"#$All quadrants. %$The child tile at a given quadrant. &?The parent with quadrant information for the tile. Satisfies: + quadParent (quadChild c q) == Just (c, q) '1The path from this tile to the root. Satisfies: ( foldr quadChild root (quadPath q) == q (8Suggested file system location for data pertaining to a . *&Substitution tiling for square tiles. )  !"#$%&'("!# $%&'( !"#$%&'(portableunstableclaudiusmaximus@goto10.org)  !"#$%&'(+      !"#$%&'()*+,-./ tilings-0.1Data.Tiling.ClassData.Tiling.Quad Data.Tiling Rectangle northEdge southEdgeeastEdgewestEdgeTilingrootchildrenparentexteriorinteriorinsideenclosesoutsideoverlapstile tileDefault rectangleinsideRoutsideR overlapsRQuadrant SouthEast SouthWest NorthEast NorthWestQuad quadLevelquadWest quadNorthisEastisSouthisNorthisWest quadrants quadChild quadParentquadPathquadFilebaseGHC.RealRational $fTilingQuad