K      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                                                                                                                                         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~             ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5!6!7!8!9!:!;!<!=!>!?!@!A!B!C!D!E!F!G"H"I"J"K"L"M"N"O"P"Q"R"S"T"U"V"W"X"Y"Z"["\"]"^"_"`"a"b"c"d"e"f"g"h"i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#{#|#}#~########################################################################################################################################### # # # # ################### #!#"###$#%#&#'#($)$*$+$,%-%.%/%0%1%2%3%4%5%6%7%8%9%:%;%<%=%>%?%@%A%B%C%D%E%F%G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&X&Y&Z&[&\&]&^&_&`&a&b&c&d&e&f&g&h&i&j&k&l&m&n&o&p&q&r&s&t&u&v&w'x'y'z'{'|'}'~'''''''''''''''''''''''''''''''''''''''''''''''''''''''(((((((((((((((((((())))))))))))))))))))))))))))))))))**********+++,,,,,,,,,,,,,,,,, , , , , ,,,,,,,,,,,,,,,,,,, ,!,",#,$,%,&,',(,),*,+,,,-,.,/,0,1,2,3,4,5,6,7,8,9,:,;,<,=,>,?,@,A,B,C,D,E,F,G,H,I,J,K,L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-[-\-]-^-_-`-a-b-c-d-e-f-g-h-i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.{.|.}.~...........////////////////////////////////////00000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111 1 1 1 1 1111111111111111111 1!1"1#1$1%1&1'1(1)1*1+1,1-1.1/101112131415161718191:1;1<1=1>1?1@1A1B1C1D1E1F1G1H1I2J2K2L2M2N2O2P2Q2R2S2T2U2V2W2X2Y2Z2[2\2]2^2_2`2a2b2c2d2e2f2g2h2i2j2k2l2m2n2o2p2q2r2s2t2u2v2w2x2y2z2{2|2}2~2233333333344444444444445555666777777777777777777777777777777777777777777778888888888888888888888888888889999999999999999:::::;;;;;;<<<<=== = = = = ===============>>>> >!>"?#?$?%?&?'?(?)?*?+?,?-?.?/?0?1?2?3?4?5?6?7?8?9?:?;?<?=?>??@@@A@BACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZA[A\A]B^B_B`BaBbCcCdCeDfDgDhDiDjDkDlDmDnDoDpDqDrDsDtDuDvDwDxDyDzD{D|D}D~DDDEEEEFFJNone$%&*+,/0123459:;<=DILOQRT[b Strict pair 2Fisher Yates shuffle, which shuffles in O(n) time.`Generate a list of indices in decreasing order, coupled with a random value in the range [0,i].    None$%&*+,/0123459:;<=DILOQRT[b $Strict pair with both items the same  Strict pair  strict triple      None$%&*+,/0123459:;<=DILOQRT[b!?`UnBounded a` represents the type a, together with an element $/ larger than any other element, and an element "", smaller than any other element.&2`Bottom a` represents the type a, together with a &p element, i.e. an element that is smaller than any other element. We can think of `Bottom a` being defined as:data Bottom a = Bottom | ValB a(/`Top a` represents the type a, together with a (l element, i.e. an element that is greater than any other element. We can think of `Top a` being defined as:data Top a = ValT a | Top!"#$%&'()*+,-./0CDEFG!"#$%&'()*+,-CD())-,&''+*!"#$%CD!"#$%&'()*+,-./0CDEFGNone$%&*+,/0123459:;<=DILOQRT[bHrGet the index h such that everything strictly smaller than h has: p i = False, and all i >= h, we have p h = True)returns Nothing if no element satisfies prunning time: O(\log^2 n + T*\log n), where T' is the time to execute the predicate.IGPartition the seq s given a monotone predicate p into (xs,ys) such thathall elements in xs do *not* satisfy the predicate p all elements in ys do satisfy the predicate p+all elements in s occur in either xs or ys.running time: O(\log^2 n + T*\log n), where T' is the time to execute the predicate.JoGiven a monotonic predicate p, a lower bound l, and an upper bound u, with: p l = False p u = True l < u.rGet the index h such that everything strictly smaller than h has: p i = False, and all i >= h, we have p h = Truerunning time: O(\log(u - l))HIJHIJHIJHIJNone$%&*+,/0123459:;<=DILOQRT[bK^A view of the right end of the sequence, with the guarantee that it has at least one element.M Right viewsYA view of the right end of the seq, with the guarantee that it has at least two elementsOAt least one elementQ Left viewsS]Basically Data.Sequence but with the guarantee that the list contains at least two elements.V[get the element with index i, counting from the left and starting at 0. O(log(min(i,n-i)))[-Concatenate two sequences. O(log(min(n1,n2)))\,pre: the list contains at least two elements]fmap but with an indexaLConvert a Seq into a Seq2. It is not checked that the length is at least twofO(1) get a left viewiO(1) get a right viewqTWe throw away information here; namely that the combined list contains two elements.xAt least two elements3KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} KLMNOPQRSTUVWXYZ[\]^_`abcdefghij3ST}|{zyUVWXYZ[\]^_`aQRxwvOPutsrqbcdefghMNponKLmlkij.KLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}None$%&*+,/0123459:;<=DILOQRT[b;LSeq n a certifies that the sequence has *at least* n itemsJPromises that the length of this LSeq is actually n. This is not checked.This function should be a noop[get the element with index i, counting from the left and starting at 0. O(log(min(i,n-i)))2.55555555None$%&*+,/0123459:;<=DILOQRT[b 'Cyclic representation of a permutation.Nidxes (fromEnum a) = (i,j) implies that a is the j^th item in the i^th orbit*Orbits (Cycles) are represented by vectors!The cycle containing a given item!Next item in a cyclic permutationcLookup the indices of an element, i.e. in which orbit the item is, and the index within the orbit.runnign time: O(1)CApply the permutation, i.e. consider the permutation as a function.7Find the cycle in the permutation starting at element sjGiven the size n, and a list of Cycles, turns the cycles into a cyclic representation of the Permutation.lens indexing into a vector None$%&*+,/0123459:;<=DILOQRT[bsDatatype representing d dimensional vectors. Our implementation wraps the implementation provided by fixed-vector..A proxy which can be used for the coordinates.-Pattern synonym for two and three dim vectorsLens into the i th element Similar to x above. Except that we don't have a static guarantee that the index is in bounds. Hence, we can only return a Traversal!Get the head and tail of a vector.Cross product of two three-dimensional vectorsConversion to a Linear.V3Conversion from a Linear.V3(Add an element at the back of the vector)Get a vector of the first d - 1 elements.&Get a prefix of i elements of a vectorMap with indices Construct a 2 dimensional vector Construct a 3 dimensional vector#Destruct a 2 dim vector into a pair&&"None$%&*+,/0123459:;<=DILOQRT[b $Test if v is a scalar multiple of u.$v2 1 1 `isScalarMultipleOf` v2 10 10True#v2 1 1 `isScalarMultipleOf` v2 10 1False(v2 1 1 `isScalarMultipleOf` v2 11.1 11.1True(v2 1 1 `isScalarMultipleOf` v2 11.1 11.2False(v2 2 1 `isScalarMultipleOf` v2 11.1 11.2False"v2 2 1 `isScalarMultipleOf` v2 4 2True"v2 2 1 `isScalarMultipleOf` v2 4 0False 8Get the scalar labmda s.t. v = lambda * u (if it exists)    =       None!$%&*+,/01234569:;<=@DILOPQRT[b TWhen using IntersectionOf we may need some constraints that are always true anyway.g  h  =* The intersection of g and h is non-empty.The default implementation computes the intersection of g and h, and uses nonEmptyIntersection to determine if the intersection is non-empty.Helper to implement .QThe type family specifying the list of possible result types of an intersection.6The result of interesecting two geometries is a CoRec,=A simple data type expressing that there are no intersections=A type family for types that have an associated numeric type.A type family for types that are associated with a dimension. The dimension is the dimension of the geometry they are embedded in.Helper to produce a corec5Returns True iff the result is *not* a NoIntersection  None $%&*+,/01234579:;<=DILOQRT[b <AA range from l to u, ignoring/forgetting the type of the enpointsB Test if a value lies in a range.1 `inRange` (OpenRange 0 2)True1 `inRange` (OpenRange 0 1)False1 `inRange` (ClosedRange 0 1)True1 `inRange` (ClosedRange 1 1)True10 `inRange` (OpenRange 1 10)False10 `inRange` (ClosedRange 0 1)FalseCGet the width of the intervalwidth $ ClosedRange 1 109width $ OpenRange 5 105EtClip the interval from below. I.e. intersect with the interval {l,infty), where { is either open, (, orr closed, [.FhClip the interval from above. I.e. intersect with (-infty, u}, where } is either open, ), or closed, ],G>Wether or not the first range completely covers the second oneHCheck if the range is valid and nonEmpty, i.e. if the lower endpoint is indeed smaller than the right endpoint. Note that we treat empty open-ranges as invalid as well.!Compare end points, Closed < Open%Compare the end points, Open < ClosedI!Shift a range x units to the left-prettyShow $ shiftLeft 10 (ClosedRange 10 20) "[0, 10]"+prettyShow $ shiftLeft 10 (OpenRange 15 25) "(5, 15)"JShifts the range to the right.prettyShow $ shiftRight 10 (ClosedRange 10 20) "[20, 30]",prettyShow $ shiftRight 10 (OpenRange 15 25) "(25, 35)"!#$%&'()*+,-<=>?@ABCDEFGHIJKL#$%&')(*+,<=>?@ABCDEFGHIJ'()+,*#$%&A?@>=<BCEFDHGIJ#$%&'()*+,-<=>?@ABCDEFGHIJKLGNone$%&*+,/0123459:;<=DILOQRT[b%reexporting some standard combinatorsinfix variant of notfollowed byRunning parsers in reverse;Runs parser q ``in reverse'' on the end of the input stream1run the parsers in reverse order, first q, then p"the variants with missing brackets11222 None$%&*+,/0123459:;<=DILOQRT[bMNOPMNOPMNOPMNOP None#$%&*+,/0123459:;<=@DILOQRT[bglAttr implements the mapping from labels to types as specified by the (symbol representing) the type family fGive pref. to the *RIGHT* Possible values for an ipe arrow>IpeOpacity, IpeTyling, and IpeGradient are all symbolic valuesAllowed Fill typesPath AttributesPossible attributes for a path data PathAttributeUniverse = Stroke | Fill | Dash | Pen | LineCap | LineJoin | FillRule | Arrow | RArrow | Opacity | Tiling | Gradient deriving (Show,Eq)Possible values for DashTODOSymbol AttributesThe optional Attributes for a symbol data SymbolAttributeUniverse = SymbolStroke | SymbolFill | SymbolPen | Size deriving (Show,Eq)BMany types either consist of a symbolc value, or a value of type v"Possible values for TransformationCommon AttributesPossible values for Pin.gets and removes the attribute from Attributesunsets/Removes an attributeIFunction that states that all elements in xs satisfy a given constraint c3Wrap up a value with a capability given by its typedFor the types representing attribute values we can get the name/key to use when serializing to ipe.Writing Attribute namesQRSTUVWXYZ[\]^_`abcghijklmnopqrstuvwxyz{|}~     zQ^YSRTUVWXZ[\]_`abcghijklmnopqrstuvwxyz{|}~QRSTUVWXYZ[\]^_`abc~}|{zyxwvutsrqponmlkjghi     TQRSTUVWXYZ[\]^_`abcghijklmnopqrstuvwxyz{|}~     None$%&*+,/0123459:;<=DILOQRT[b,Open on left endpoint; so Closed before open.Order on right endpoint; so Open before Closed  !' '  !' !'None$%&*+,/01234579:;<=DILOQRT[b()*+,-./0123456()*+,-.()6543210/*+,-.()*+,-./0123456(1)1None$%&*+,/0123459:;<=DILOQRT[b>An Interval is essentially a HI but with possible payloadNTest if a value lies in an interval. Note that the difference between inInterval and inRange is that the extra value is *not* used in the comparison with inInterval, whereas it is in inRange.>?@CDEFGHIJKLMNOPQRSTUVW)#$%&')(*+,<=>?@ABCDEFGHIJ>?@CDEFGHIJKLMNO>?@MLKGHIJCDEFNO>?@CDEFGHIJKLMNOPQRSTUVWNone $%&*+,/0123459:;<=DILOQRT[b0YA dart represents a bi-directed edge. I.e. a dart has a direction, however the dart of the oposite direction is always present in the planar graph as well.`gAn Arc is a directed edge in a planar graph. The type s is used to tie this arc to a particular graph.cReverse the direcionq~A vertex in a planar graph. A vertex is tied to a particular planar graph by the phantom type s, and to a particular world w.u"The world in which the graph livesz Get the twin of this dart (edge)twin (dart 0 "+1")Dart (Arc 0) -1twin (dart 0 "-1")Dart (Arc 0) +1{test if a dart is PositiveA *connected* Planar graph with bidirected edges. I.e. the edges (darts) are directed, however, for every directed edge, the edge in the oposite direction is also in the graph.vThe types v, e, and f are the are the types of the data associated with the vertices, edges, and faces, respectively.HThe orbits in the embedding are assumed to be in counterclockwise order. Edge Oracle:main idea: store adjacency lists in such a way that we store an edge (u,v) either in u's adjacency list or in v's. This can be done s.t. all adjacency lists have length at most 6.Pnote: Every edge is stored exactly once (i.e. either at u or at v, but not both)A facelens to access the Dart DataedgeData is just an alias for ?Reorders the edge data to be in the right order to set edgeDataConstruct a planar graphNConstruct a planar graph, given the darts in cyclic order around each vertex.running time: O(n).}Construct a planar graph from a adjacency matrix. For every vertex, all vertices should be given in counter clockwise order.running time: O(n).Get the number of verticesnumVertices myGraph4Get the number of DartsnumDarts myGraph12Get the number of EdgesnumEdges myGraph6Get the number of facesnumFaces myGraph4Enumerate all verticesvertices' myGraph-[VertexId 0,VertexId 1,VertexId 2,VertexId 3]7Enumerate all vertices, together with their vertex dataEnumerate all darts&Get all darts together with their datamapM_ print $ darts myGraph (Dart (Arc 0) -1,"a-")(Dart (Arc 2) +1,"c+")(Dart (Arc 1) +1,"b+")(Dart (Arc 0) +1,"a+")(Dart (Arc 4) -1,"e-")(Dart (Arc 1) -1,"b-")(Dart (Arc 3) -1,"d-")(Dart (Arc 5) +1,"g+")(Dart (Arc 4) +1,"e+")(Dart (Arc 3) +1,"d+")(Dart (Arc 2) -1,"c-")(Dart (Arc 5) -1,"g-")6Enumerate all edges. We report only the Positive dartsMEnumerate all edges with their edge data. We report only the Positive darts.mapM_ print $ edges myGraph(Dart (Arc 2) +1,"c+")(Dart (Arc 1) +1,"b+")(Dart (Arc 0) +1,"a+")(Dart (Arc 5) +1,"g+")(Dart (Arc 4) +1,"e+")(Dart (Arc 3) +1,"d+")=The tail of a dart, i.e. the vertex this dart is leaving fromrunning time: O(1)%The vertex this dart is heading in torunning time: O(1)(endPoints d g = (tailOf d g, headOf d g)running time: O(1)CAll edges incident to vertex v, in counterclockwise order around v.running time: O(k), where k is the output sizeLAll incoming edges incident to vertex v, in counterclockwise order around v.LAll outgoing edges incident to vertex v, in counterclockwise order around v.YGets the neighbours of a particular vertex, in counterclockwise order around the vertex.running time: O(k), where k is the output size\Get the vertex data associated with a node. Note that updating this data may be expensive!!running time: O(1)Edge data of a given dartrunning time: O(1)Data of a face of a given facerunning time: O(1)/Data corresponding to the endpoints of the dart/Data corresponding to the endpoints of the dartrunning time: O(1)The dual of this graph:{  let fromList = V.fromList/ answer = fromList [ fromList [dart 0 "-1"]S , fromList [dart 2 "+1",dart 4 "+1",dart 1 "-1",dart 0 "+1"]G , fromList [dart 1 "+1",dart 3 "-1",dart 2 "-1"]S , fromList [dart 4 "-1",dart 3 "+1",dart 5 "+1",dart 5 "-1"] ]. in (dual myGraph)^.embedding.orbits == answer:}Truerunning time: O(n).'Enumerate all faces in the planar graphAll faces with their face data. The face to the left of the dartleftFace (dart 1 "+1") myGraphFaceId 1leftFace (dart 1 "-1") myGraphFaceId 2leftFace (dart 2 "+1") myGraphFaceId 2leftFace (dart 0 "+1") myGraphFaceId 0running time: O(1).!The face to the right of the dartrightFace (dart 1 "+1") myGraphFaceId 2rightFace (dart 1 "-1") myGraphFaceId 1rightFace (dart 2 "+1") myGraphFaceId 1rightFace (dart 0 "+1") myGraphFaceId 1running time: O(1).tThe darts bounding this face, for internal faces in clockwise order, for the outer face in counter clockwise order.running time: O(k), where k is the output size.wThe vertices bounding this face, for internal faces in clockwise order, for the outer face in counter clockwise order.running time: O(k), where k is the output size.eBuilds an edge oracle that can be used to efficiently test if two vertices are connected by an edge.running time: O(n))Test if u and v are connected by an edge.running time: O(1)EFind the edge data corresponding to edge (u,v) if such an edge existsrunning time: O(1)]YZ[\]^_`abcdefqrstuvwxyz{|}DYZ[\]_^`abcqrstuvwxyz{D`ab]^_cYZ[\xyz{uvwtqrsIYZ[\]^_`abcdefqrstuvwxyz{|}None$%&*+,/0123459:;<=DILOQRT[bNonempty circular sequence.Gets the focus of the CSeq running time: O(1)GAccess the i^th item (w.r.t the focus) in the CSeq (indices modulo n).running time: O(\log (i \mod n))index (fromList [0..5]) 11index (fromList [0..5]) 22index (fromList [0..5]) 55index (fromList [0..5]) 104index (fromList [0..5]) 60index (fromList [0..5]) (-1)5index (fromList [0..5]) (-6)04Adjusts the i^th element w.r.t the focus in the CSeqrunning time: O(\log (i \mod n))'adjust (const 1000) 2 (fromList [0..5])CSeq [0,1,1000,3,4,5]:Access te ith item in the CSeq (w.r.t the focus) as a lens5smart constructor that automatically balances the seq4Builds a balanced seq with the element as the focus.rotates one to the rightrunning time: O(1) (amortized)rotateR $ fromList [3,4,5,1,2]CSeq [4,5,1,2,3]rotates the focus to the leftrunning time: O(1) (amortized)rotateL $ fromList [3,4,5,1,2]CSeq [2,3,4,5,1]8mapM_ print . take 5 $ iterate rotateL $ fromList [1..5]CSeq [1,2,3,4,5]CSeq [5,1,2,3,4]CSeq [4,5,1,2,3]CSeq [3,4,5,1,2]CSeq [2,3,4,5,1]1Convert to a single Seq, starting with the focus.9All elements, starting with the focus, going to the right8All elements, starting with the focus, going to the left#leftElements $ fromList [3,4,5,1,2]fromList [3,2,1,5,4] builds a CSeq Rotates i elements to the right.pre: 0 <= i < nrunning time:  O(\log i) amortizedrotateNR 0 $ fromList [1..5]CSeq [1,2,3,4,5]rotateNR 1 $ fromList [1..5]CSeq [2,3,4,5,1]rotateNR 4 $ fromList [1..5]CSeq [5,1,2,3,4]Rotates i elements to the left.pre: 0 <= i < nrunning time:  O(\log i) amoritzedrotateNL 0 $ fromList [1..5]CSeq [1,2,3,4,5]rotateNL 1 $ fromList [1..5]CSeq [5,1,2,3,4]rotateNL 2 $ fromList [1..5]CSeq [4,5,1,2,3]rotateNL 3 $ fromList [1..5]CSeq [3,4,5,1,2]rotateNL 4 $ fromList [1..5]CSeq [2,3,4,5,1]#Reversres the direction of the CSeqrunning time: O(n)"reverseDirection $ fromList [1..5]CSeq [1,5,4,3,2]Finds an element in the CSeq%findRotateTo (== 3) $ fromList [1..5]Just (CSeq [3,4,5,1,2])%findRotateTo (== 7) $ fromList [1..5]Nothing+All rotations, the input CSeq is the focus.,mapM_ print . allRotations $ fromList [1..5]CSeq [1,2,3,4,5]CSeq [2,3,4,5,1]CSeq [3,4,5,1,2]CSeq [4,5,1,2,3]CSeq [5,1,2,3,4]"Left zip": zip the two CLists, pairing up every element in the *left* list with its corresponding element in the right list. If there are more items in the right clist they are discarded. see 'zipLWith%same as zipLWith but with three itemsGiven a circular seq, whose elements are in increasing order, insert the new element into the Circular seq in its sorted order.insertOrd 1 $ fromList [2] CSeq [2,1]insertOrd 2 $ fromList [1,3] CSeq [1,2,3]insertOrd 31 ordListCSeq [5,6,10,20,30,31,1,2,3]insertOrd 1 ordListCSeq [5,6,10,20,30,1,1,2,3]insertOrd 4 ordListCSeq [5,6,10,20,30,1,2,3,4]insertOrd 11 ordListCSeq [5,6,10,11,20,30,1,2,3]running time: O(n)_Insert an element into an increasingly ordered circular list, with specified compare operator.running time: O(n)List version of insertOrdBy; i.e. the list contains the elements in cirulcar order. Again produces a list that has the items in circular order.}Test if the circular list is a cyclic shift of the second list. Running time: O(n), where n is the size of the smallest list'&None$%&*+,/0123459:;<=DILOQRT[bGiven a circular list, whose elements are in increasing order, insert the new element into the Circular list in its sorted order.insertOrd 1 C.empty fromList [1]insertOrd 1 $ C.fromList [2]fromList [2,1]insertOrd 2 $ C.fromList [1,3]fromList [1,2,3]insertOrd 31 ordList fromList [5,6,10,20,30,31,1,2,3]insertOrd 1 ordListfromList [5,6,10,20,30,1,1,2,3]insertOrd 4 ordListfromList [5,6,10,20,30,1,2,3,4]insertOrd 11 ordList fromList [5,6,10,11,20,30,1,2,3]_Insert an element into an increasingly ordered circular list, with specified compare operator.List version of insertOrdBy; i.e. the list contains the elements in cirulcar order. Again produces a list that has the items in circular order.}Test if the circular list is a cyclic shift of the second list. Running time: O(n), where n is the size of the smallest listNone$%&*+,/0123459:;<=DILOQRT[b1Quadrants of two dimensional points. in CCW orderPTypes that we can transform by mapping a function on each point in the structureA d-dimensional point.Similarly, we can write::{ let& g :: Point 3 r -> r g (Point3 x y z) = z in g myPoint:}3aWe provide pattern synonyms Point2 and Point3 for 2 and 3 dimensional points. i.e. we can write::{ let$ f :: Point 2 r -> r f (Point2 x y) = x in f (point2 1 2):}1 if we want.-Point representing the origin in d dimensionsorigin :: Point 4 IntPoint4 [0,0,0,0]6Lens to access the vector corresponding to this point.(point3 1 2 3) ^. vectorVector3 [1,2,3]origin & vector .~ v3 1 2 3Point3 [1,2,3]{Get the coordinate in a given dimension. This operation is unsafe in the sense that no bounds are checked. Consider using  instead.point3 1 2 3 ^. unsafeCoord 22'Get the coordinate in a given dimension point3 1 2 3 ^. coord (C :: C 2)2%point3 1 2 3 & coord (C :: C 1) .~ 10Point3 [10,2,3]'point3 1 2 3 & coord (C :: C 3) %~ (+1)Point3 [1,2,4]-Constructs a point from a list of coordinates,pointFromList [1,2,3] :: Maybe (Point 3 Int)Just Point3 [1,2,3]Construct a 2 dimensional point point2 1 2 Point2 [1,2]Destruct a 2 dimensional point_point2 $ point2 1 2(1,2)Construct a 3 dimensional point point3 1 2 3Point3 [1,2,3]Destruct a 3 dimensional point_point3 $ point3 1 2 3(1,2,3),Shorthand to access the first coordinate C 1point3 1 2 3 ^. xCoord1point2 1 2 & xCoord .~ 10 Point2 [10,2]-Shorthand to access the second coordinate C 2point2 1 2 ^. yCoord2point3 1 2 3 & yCoord %~ (+1)Point3 [1,3,3],Shorthand to access the third coordinate C 3point3 1 2 3 ^. zCoord3point3 1 2 3 & zCoord %~ (+1)Point3 [1,2,4]TGiven three points p q and r determine the orientation when going from p to r via q.Sort the points arround the given point p in counter clockwise order with respect to the rightward horizontal ray starting from p. If two points q and r are colinear with p, the closest one to p is reported first. running time: O(n log n)Quadrants around point c; quadrants are closed on their "previous" boundary (i..e the boundary with the previous quadrant in the CCW order), open on next boundary. The origin itself is assigned the topRight quadrant$Quadrants with respect to the origingGiven a center point c, and a set of points, partition the points into quadrants around c (based on their x and y coordinates). The quadrants are reported in the order topLeft, topRight, bottomLeft, bottomRight. The points are in the same order as they were in the original input lists. Points with the same x-or y coordinate as p, are "rounded" to above.Counter clockwise ordering of the points around c. Points are ordered with respect to the positive x-axis. Points nearer to the center come before points further away.Clockwise ordering of the points around c. Points are ordered with respect to the positive x-axis. Points nearer to the center come before points further away.Given a center c, a new point p, and a list of points ps, sorted in counter clockwise order around c. Insert p into the cyclic order. The focus of the returned cyclic list is the new point p.running time: O(n)-Squared Euclidean distance between two points%Euclidean distance between two points*   '*       None"$%&*+,/01234579:;<=DILOQRT[bJA line is given by an anchor point and a vector indicating the direction. Result of a side test$`Types for which we can compute a supporting line, i.e. a line that contains the thing of type t.(*A line may be constructed from two points.+]Given a line l with anchor point p, get the line perpendicular to l that also goes through p.,mTest if two lines are identical, meaning; if they have exactly the same anchor point and directional vector.-#Test if the two lines are parallel.TlineThrough origin (point2 1 0) `isParallelTo` lineThrough (point2 1 1) (point2 2 1)TrueTlineThrough origin (point2 1 0) `isParallelTo` lineThrough (point2 1 1) (point2 2 2)False.Test if point p lies on line l/origin `onLine` lineThrough origin (point2 1 0)True5point2 10 10 `onLine` lineThrough origin (point2 2 2)True4point2 10 5 `onLine` lineThrough origin (point2 2 2)False/'Squared distance from point p to line l0bThe squared distance between the point p and the line l, and the point m realizing this distance.1-Create a line from the linear function ax + b2gget values a,b s.t. the input line is described by y = ax + b. returns Nothing if the line is vertical3Given a point q and a line l, compute to which side of l q lies. For vertical lines the left side of the line is interpeted as below.8point2 10 10 `onSide` (lineThrough origin $ point2 10 5)Above;point2 10 10 `onSide` (lineThrough origin $ point2 (-10) 5)Above%point2 5 5 `onSide` (verticalLine 10)Below;point2 5 5 `onSide` (lineThrough origin $ point2 (-3) (-3))On46Test if the query point q lies (strictly) above line l5#Get the bisector between two points !"#$%&'()*+,-./012345678 #!"$%&'()*+,-./012345'&8()*+,-.7/0$%612 !"#345 !"#$%&'()*+,-./012345678None$%&*+,/0123459:;<=DILOQRT[bBwPart of a line. The interval is ranged based on the unit-vector of the line l, and s.t.t zero is the anchorPoint of l.HGet the point at the given position along line, where 0 corresponds to the anchorPoint of the line, and 1 to the point anchorPoint .+^ directionVectorI3Annotate the subRange with the actual ending pointsJNgiven point p on line (Line q v), Get the scalar lambda s.t. p = q + lambda v BCDEFGHIJKL BCDEFGHIJK BCDEGFHIJLKBCDEFGHIJKLNone$%&*+,/0123459:;<=DILOQRT[bTIA class representing types that can be transformed using a transformationV>A type representing a Transformation for d dimensional objectsY?a matrix of n rows, each of m columns, storing values of type r^'Compose transformations (right to left)gcCreates a row with zeroes everywhere, except at position i, where the value is the supplied value.hRow in a translation matrixRSTUVWXYZ[\]^_`abcdefghiRSTUVWXYZ[\]^_`abcdefghYZ[\VWX]^TU_S`iabcRdefghRSTUVWXYZ[\]^_`abcdefghiNone$%&*+,/0123459:;<=DILOQRT[br`Result of a query that asks if something is Inside a g, *on* the boundary of the g, or outside.v#The boundary of a geometric object.rstuvwrstuvwvwrsturstuvwNone $%&*+,/0123459:;<=DILOQRT[b Coordinate wize minimumCoordinate wize maximumbGiven the point with the lowest coordinates and the point with highest coordinates, create a box.)Build a d dimensional Box given d ranges.Center of the boxCheck if a point lies a boxQorigin `inBox` (boundingBoxList' [point3 1 2 3, point3 10 20 30] :: Box 3 () Int)FalseZorigin `inBox` (boundingBoxList' [point3 (-1) (-2) (-3), point3 10 20 30] :: Box 3 () Int)TrueGet a vector with the extent of the box in each dimension. Note that the resulting vector is 0 indexed whereas one would normally count dimensions starting at zero.Iextent (boundingBoxList' [point3 1 2 3, point3 10 20 30] :: Box 3 () Int)`Vector3 [Range (Closed 1) (Closed 10),Range (Closed 2) (Closed 20),Range (Closed 3) (Closed 30)]Get the size of the box (in all dimensions). Note that the resulting vector is 0 indexed whereas one would normally count dimensions starting at zero.>size (boundingBoxList' [origin, point3 1 2 3] :: Box 3 () Int)Vector3 [1,2,3]XGiven a dimension, get the width of the box in that dimension. Dimensions are 1 indexed.LwidthIn (C :: C 1) (boundingBoxList' [origin, point3 1 2 3] :: Box 3 () Int)1LwidthIn (C :: C 3) (boundingBoxList' [origin, point3 1 2 3] :: Box 3 () Int)3Same as 6 but with a runtime int instead of a static dimension.DwidthIn' 1 (boundingBoxList' [origin, point3 1 2 3] :: Box 3 () Int)Just 1DwidthIn' 3 (boundingBoxList' [origin, point3 1 2 3] :: Box 3 () Int)Just 3EwidthIn' 10 (boundingBoxList' [origin, point3 1 2 3] :: Box 3 () Int)NothingGet the corners of a rectangle, the order is: (TopLeft, TopRight, BottomRight, BottomLeft). The extra values in the Top points are taken from the Top point, the extra values in the Bottom points are taken from the Bottom pointOUnsafe version of boundingBoxList, that does not check if the list is non-empty) )!None $%&*+,/0123459:;<=DILOQRT[b Line segments. LineSegments have a start and end point, both of which may contain additional data of type p. We can think of a Line-Segment being defined asdata LineSegment d p r = LineSegment (EndPoint (Point d r :+ p)) (EndPoint (Point d r :+ p))HGets the start and end point, but forgetting if they are open or closed.6Pattern that essentially models the line segment as a:data LineSegment d p r = LineSegment (EndPoint (Point d r :+ p)) (EndPoint (Point d r :+ p)),Directly convert a line into a line segment.'Test if a point lies on a line segment.N(point2 1 0) `onSegment` (ClosedLineSegment (origin :+ ()) (point2 2 0 :+ ()))TrueN(point2 1 1) `onSegment` (ClosedLineSegment (origin :+ ()) (point2 2 0 :+ ()))FalseN(point2 5 0) `onSegment` (ClosedLineSegment (origin :+ ()) (point2 2 0 :+ ()))FalseQ(point2 (-1) 0) `onSegment` (ClosedLineSegment (origin :+ ()) (point2 2 0 :+ ()))FalseN(point2 1 1) `onSegment` (ClosedLineSegment (origin :+ ()) (point2 3 3 :+ ()))TrueVNote that the segments are assumed to be closed. So the end points lie on the segment.N(point2 2 0) `onSegment` (ClosedLineSegment (origin :+ ()) (point2 2 0 :+ ()))TrueHorigin `onSegment` (ClosedLineSegment (origin :+ ()) (point2 2 0 :+ ()))True,This function works for arbitrary dimensons.R(point3 1 1 1) `onSegment` (ClosedLineSegment (origin :+ ()) (point3 3 3 3 :+ ()))TrueR(point3 1 2 1) `onSegment` (ClosedLineSegment (origin :+ ()) (point3 3 3 3 :+ ()))FalseNThe left and right end point (or left below right if they have equal x-coords)Length of the line segmentNSquared distance from the point to the Segment s. The same remark as for the  applies here.ESquared distance from the point to the Segment s, and the point on s realizing it. Note that if the segment is *open*, the closest point returned may be one of the (open) end points, even though technically the end point does not lie on the segment. (The true closest point then lies arbitrarily close to the end point).,flips the start and end point of the segment5#$%&')(*+,<=>?@ABCDEFGHIJ>?@CDEFGHIJKLMNO None!$%&*+,/01234579:;<=DILOQRT[bOriented from *left to right*-The right side, oriented from *bottom* to topThe sides of the rectangle, in order (Top, Right, Bottom, Left). The sides themselves are also oriented in clockwise order. If, you want them in the same order as the functions , , , and , use  instead.YThe sides of the rectangle. The order of the segments is (Top, Right, Bottom, Left). Note that the segments themselves, are oriented as described by the functions topSide, bottomSide, leftSide, rightSide (basically: from left to right, and from bottom to top). If you want the segments oriented along the boundary of the rectangle, use the  function instead.&None$%&*+,/0123459:;<=DILOQRT[b*Lines are transformable, via line segments #!"$%&'()*+,-./012345None $%&*+,/0123459:;<=DILOQRT[b A d-dimensional ball.%Spheres, i.e. the boundary of a ball.&A lens to get/set the radius of a Ball?Given two points on the diameter of the ball, construct a ball.FConstruct a ball given the center point and a point p on the boundary.1A d dimensional unit ball centered at the origin.+Test if a point lies strictly inside a ball&(point2 0.5 0.0) `insideBall` unitBallTrue"(point2 1 0) `insideBall` unitBallFalse"(point2 2 0) `insideBall` unitBallFalse&Test if a point lies in or on the ball/Test if a point lies on the boundary of a ball.(point2 1 0) `onBall` unitBallTrue (point3 1 1 0) `onBall` unitBallFalsetGiven three points, get the disk through the three points. If the three input points are colinear we return Nothing1disk (point2 0 10) (point2 10 0) (point2 (-10) 0)FJust (Ball {_center = Point2 [0.0,0.0] :+ (), _squaredRadius = 100.0})2Creates a circle from three points on the boundaryNone$%&*+,/0123459:;<=DILOQRT[b1Maps a line point (px,py) to a line (y=px*x - py)ZReturns Nothing if the input line is vertical Maps a line l: y = ax + b to a point (a,-b)#Pre: the input line is not verticalNone!$%&*+,/01234579:;<=DILOQRT[bd-dimensional Half-Lines#Test if a point lies on a half-lineTransform a LineSegment into a half-line, by forgetting the second endpoint. Note that this also forgets about if the starting point was open or closed.                     None $%&*+,/0123459:;<=DILOQRT[b%MThe two bounding lines of the slab, first the lower one, then the higher one:(0Smart consturctor for creating a horizontal slab).Smart consturctor for creating a vertical slab$%&'()*+,-./01234 $%&'()*'()43210/$%&.-,+*$%&'()*+,-./01234!None $%&*+,/0123459:;<=DILOQRT[b5A Poly line in R^d90pre: The input list contains at least two points:`pre: The input list contains at least two points. All extra vields are initialized with mempty.;'We consider the line-segment as closed.<@Convert to a closed line segment by taking the first two points.=\Stricter version of asLineSegment that fails if the Polyline contains more than two points.56789:;<=>?@ABC 56789:;<=5678CBA@?>9:;<= 56789:;<=>?@ABC"None$%&*+,/0123459:;<=DILOQRT[bLOWe distinguish between simple polygons (without holes) and Polygons with holes.Q,Access the i^th vertex on the outer boundarySGet all holes in a polygonTXThe vertices in the polygon. No guarantees are given on the order in which they appear!VKThe edges along the outer boundary of the polygon. The edges are half open.WUGiven the vertices of the polygon. Produce a list of edges. The edges are half-open.XATest if q lies on the boundary of the polygon. Running time: O(n)"point2 1 1 `onBoundary` simplePolyFalse"point2 0 0 `onBoundary` simplePolyTrue#point2 10 0 `onBoundary` simplePolyTrue#point2 5 13 `onBoundary` simplePolyFalse#point2 5 10 `onBoundary` simplePolyFalse#point2 10 5 `onBoundary` simplePolyTrue#point2 20 5 `onBoundary` simplePolyFalseTODO: testcases multipolygonYhCheck if a point lies inside a polygon, on the boundary, or outside of the polygon. Running time: O(n).!point2 1 1 `inPolygon` simplePolyInside!point2 0 0 `inPolygon` simplePoly OnBoundary"point2 10 0 `inPolygon` simplePoly OnBoundary"point2 5 13 `inPolygon` simplePolyInside"point2 5 10 `inPolygon` simplePolyInside"point2 10 5 `inPolygon` simplePoly OnBoundary"point2 20 5 `inPolygon` simplePolyOutsideUTODO: Add some testcases with multiPolygons TODO: Add some more onBoundary testcasesZ1Test if a point lies strictly inside the polgyon.[Compute the area of a polygon\Compute the signed area of a simple polygon. The the vertices are in clockwise order, the signed area will be negative, if the verices are given in counter clockwise order, the area will be positive.])Compute the centroid of a simple polygon.^VTest if the outer boundary of the polygon is in clockwise or counter clockwise order.running time: O(1)_,Orient the outer boundary to clockwise order`4Orient the outer boundary to counter clockwise orderaDConvert a Polygon to a simple polygon by forgetting about any holes.b(Comparison that compares which point is larger) in the direction given by the vector u.cCFinds the extreme points, minimum and maximum, in a given directionrunning time: O(n)"GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghGHIJKLMNOPQRSTUVWXYZ[\]^_`abc"LMNIJKHGhgfedOPQRSTUVWXYZ[\]^_`abcGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghJBasic Geometry types(c) Frank StaalsSee LICENCE fileNone$%&*+,/0123459:;<=DILOQRT[b  #$%&')(*+,<=>?@ABCDEFGHIJ>?@CDEFGHIJKLMNO #!"$%&'()*+,-./012345RSTUVWXYZ[\]^_`abcdefgh5678:;<=GHIJKLMNOPQRSTVWXYZ[\]^_`abc#None#$%&*+,/0123459:;<=DILOQRT[bi Image ObjectsxIpe Symbols, i.e. PointsA symbol (point) in ipe~ Text ObjectsGExample of an IpeSymbol. I.e. A symbol that expresses that the size is larger sizeSymbol :: Attributes (AttrMapSym1 r) (SymbolAttributes r) sizeSymbol = attr SSize (IpeSize $ Named "large")PathsIPaths consist of Path Segments. PathSegments come in the following forms:/A path is a non-empty sequence of PathSegments.#type that represents a path in ipe.zThe mapping between the labels of the the attributes and the types of the attributes with these labels. For example, the Y= label/attribute should have a value of type 'Matrix 3 3 r'.BAn IpeObject' is essentially the oject ogether with its attributes,Attributes' :: * -> [AttributeUniverse] -> *Groups and ObjectsGroup Attributes,A group is essentially a list of IpeObjects.;The definition of a view make active layer into an index ?#for now we pretty much ignore these The maybe string is the encoding WAn IpePage is essentially a Group, together with a list of layers and a list of views.A complete ipe file$Creates a simple page with no views."JConvenience function to construct an ipe file consisting of a single page.#7Create a single page ipe file from a list of IpeObjects$8Takes and applies the ipe Matrix attribute of this item.%2Applies the matrix to an ipe object if it has one.ijklmnoxyz{|}~     !"#$%&'ijklmnoxyz{|}~     !"#$%&'mnoijkl~|}xyz{    ! "#$%&'\ijklmnoxyz{|}~      !"#$%&'$None$%&*+,/0123459:;<=DILOQRT[b(|Try to convert a path into a line segment, fails if the path is not a line segment or a polyline with more than two points.)5Convert to a polyline. Ignores all non-polyline parts*?Convert to a simple polygon: simply takes the first closed path+use the first prism to select the ipe object to depicle with, and the second how to select the geometry object from there on. Then we can select the geometry object, directly with its attributes here.()*+()*+()*+()*+%None$%&*+,/0123459:;<=DILOQRT[b/ORepresent stuff that can be used as a coordinate in ipe. (similar to show/read)2Running the parsers<The parsers themselvesA/Generate a matrix from a list of 6 coordinates.,-./0123456789:;<=>?@ABCD,-./0123456789:;<=>?@A/01DC234,-.B56789:;<=>?@A,-./0123456789:;<=>?@ABCD&None $%&*+,/0123459:;<=DILOQRT[bGOBasically IpeReadText for attributes. This class is not really meant to be implemented directly. Just define an IpeReadText instance for the type (Apply f at), then the generic instance below takes care of looking up the name of the attribute, and calling the right ipeReadText value. This class is just so that reifyConstraint in T7 can select the right typeclass when building the rec.IReading an ipe lement from XmlK'Reading an ipe elemtn from a Text valueN,Given a file path, tries to read an ipe fileO]Given a file path, tries to read an ipe file. This function applies all matrices to objects.PwSince most Ipe file contain only one page, we provide a shortcut for that as well. This function applies all matrices.QqGiven a Bytestring, try to parse the bytestring into anything that is IpeReadable, i.e. any of the Ipe elements.R3Reads the data from a Bytestring into a proper Node&Combination of zipRecWith and traverseTReading the Attributes into a Rec (Attr f), all based on the types of f (the type family mapping labels to types), and a list of labels (ats).UReader for records. Given a proxy of some ipe type i, and a proxy of an coordinate type r, read the IpeAttributes for i from the xml node.VIf we can ipeRead an ipe element, and we can ipeReadAttrs its attributes we can properly read an ipe object using ipeReadObject{Given a list of Nodes, try to parse all of them as a big text. If we encounter anything else then text, the parsing fails.:try reading everything as an a. Throw away whatever fails.dIpe read instances<GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvGHIJKLMNOPQRSTUVNOPMQRKLIJGHSVUT9GHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuv'None $%&*+,/0123459:;<=DILOQRT[b wTypes that correspond to an XML Element. All instances should produce an Element. If the type should produce a Node with the Text constructor, use the y typeclass instead.y'For types that can produce a text value{Given a prism to convert something of type g into an ipe file, a file path, and a g. Convert the geometry and write it to file.Write an IpeFiele to file.|2Creates a single page ipe file with the given page}Convert the input to ipeXml, and prints it to standard out in such a way that the copied text can be pasted into ipe as a geometry object.~$Convert input into an ipe selection.Convert to Ipe xml2Convert to ipe XML and write the output to a file.(Functon to write all attributes in a RecWriting the attribute valuesAdd attributes to a nodeSame as  but then for a Maybe nodeCThis instance converts the ratio to a Pico, and then displays that.:wxyz{|}~wxyz{|}~:{|}~yzwx8wxyz{|}~(Convex Polygons(c) Frank StaalsSee LICENCE fileNone $%&*+,/0123459:;<=DILOQRT[b CFinds the extreme points, minimum and maximum, in a given direction*pre: The input polygon is strictly convex.running time:  O(\log n)BFinds the extreme maximum point in the given direction. Based on /http://geomalgorithms.com/a14-_extreme_pts.html*pre: The input polygon is strictly convex.running time:  O(\log^2 n)Rotating Right  - rotate clockwise-Merging two convex hulls, based on the paper:Two Algorithms for Constructing a Delaunay Triangulation Lee and Schachter International Journal of Computer and Information Sciences, Vol 9, No. 3, 1980O: (combined hull, lower tangent that was added, upper tangent thtat was added)-Compute the lower tangent of the two polgyonspre: - polygons lp and rp have at least 1 vertex - lp and rp are disjoint, and there is a vertical line separating the two polygons. - The vertices of the polygons are given in clockwise orderRRunning time: O(n+m), where n and m are the sizes of the two polygons respectively-Compute the upper tangent of the two polgyonspre: - polygons lp and rp have at least 1 vertex - lp and rp are disjoint, and there is a vertical line separating the two polygons. - The vertices of the polygons are given in clockwise orderRRunning time: O(n+m), where n and m are the sizes of the two polygons respectively]Computes the Minkowski sum of the two input polygons with $n$ and $m$ vertices respectively.%pre: input polygons are in CCW order.running time: O(n+m).ERotate to the rightmost point (rightmost and topmost in case of ties)=Rotate to the leftmost point (and bottommost in case of ties)=Rotate to the bottommost point (and leftmost in case of ties).Helper to get the vertices of a convex polygon              )None$%&*+,/0123459:;<=DILOQRT[b UClass that specifies a default conversion from a geometry type g into an ipe object.JAn IpeOut is essentially a funciton to convert a geometry object of type g into an ipe object of type i.Given an geometry object, and a record with its attributes, construct an ipe Object representing it using the default conversion.kasIpeObject with its arguments flipped. Convenient if you don't want to map asIpeObject over a list or so.,Create an ipe group without group attributesCreates a group out of ipeeHelper to construct an IpeOut g IpeObject , if we already know how to construct a specific Ipe type./Construct an ipe object from the core of an ExtDefault size of the cliping rectangle used to clip lines. This is Rectangle is large enough to cover the normal page size in ipe.UHelper to construct a IpeOut g Path, for when we already have an IpeOut g PathSegment!!KNone$%&*+,/0123459:;<=DILOQRT[bCQ^YSRTUVWXZ[\]_`abcghijklmnopqrstuvwxyz{|}~ijklmnoxyz{|}~     !"#$%&'()*+GHIJKLMNOPQRSTUVwxyz{|}~*None$%&*+,/0123459:;<=DILOQRT[bCompute the area of a triangle2*the area of a triangle.hget the inscribed disk. Returns Nothing if the triangle is degenerate, i.e. if the points are colinear.+None$%&*+,/0123459:;<=DILOQRT[b_Labels the edges of a plane graph with their distances, as specified by the distance function.GYZ[\]_^`abcqrstuvwxyz{,None$%&*+,/0123459:;<=?DILOQRT[b smart constructor .Create a balanced tree, i.e. a tree of height  O(\log n)" with the elements in the leaves.O(n) time. Given a function to combine internal nodes into b's and leafs into b's, traverse the tree bottom up, and combine everything into one b. ?Traverses the tree bottom up, recomputing the assocated values.fTakes two trees, that have the same structure, and uses the provided functions to "zip" them together0Get the element stored at the root, if it existsCreate a balanced binary treeO(n)+      !"     + " !           !"-None$%&*+,/0123459:;<=DILOQRT[b RFocus on the rootSGo to the left childTGo to the right childUMove to the parentVNavigate to the rootW@Returns a list of zippers; one focussed on each node in the treeX(Get the value stored at the current nodeY=Returns all subtrees; i.e. every node with all its decendentsZ:Splits the tree here, returns a pair (innerTree,outerTree)LMNOPQRSTUVWXYZLMNQPORSTUVWXYZNOPQLMRSTUVWXYZ LMNOPQRSTUVWXYZ.None $%&*+,/01234579:;<=DILOQRT[b i1Information stored in a node of the Interval Trees.IntervalTree type, storing intervals of type i}$Anything that looks like an interval8Given an ordered list of points, create an interval treeO(n)Build an interval tree O(n \log n)@Lists the intervals. We don't guarantee anything about the orderrunning time: O(n).Find all intervals that stab x O(\log n + k), where k is the output sizeFind all intervals that stab x O(\log n + k), where k is the output size@Insert : pre: the interval intersects some midpoint in the tree O(\log n) Delete an interval from the Tree O(\log n)) (under some general position assumption)ijklmstuvwx}~  ijklmstuvwx}~ijklmxvwstu}~ijklmstuvwx}~  /None$%&*+,/0123459:;<=DILOQRT[b1Expects the input to be a set, i.e. no duplicatesrunning time:  O(n \log n)Nub by sorting firstSearches in a KDTreerunning time: O(n^{(d-1)/d} + k)running time: O(n)0None$%&*+,/0123459:;<=DILOQRT[bOInternal nodes store a split point, the range, and an associated data structureCLeaf nodes store an atomic range, and an associated data structure. .We store atomic ranges a bit more efficiently.(Segment tree on a Fixed set of endpointsInterval%Class for associcated data structuresNGiven a sorted list of endpoints, without duplicates, construct a segment treeO(n) time Interleaves the two lists8interleave (NonEmpty.fromList ["0","1","2"]) ["01","12"]"0" :| ["01","1","12","2"]Build a SegmentTree O(n \log n) lists all intervals'Search for all intervals intersecting x O(\log n + k) where k is the output sizeBReturns the associated values of the nodes on the search path to x O(\log n) (Gets the range associated with this nodeNPre: the interval should have one of the endpoints on which the tree is built. Delete an interval from the tree pre: The segment is in the tree!?                 ""*                  LNone$%&*+,/0123459:;<=DILOQRT[b"1None!"$%&*+,/0123459:;<=DILOQRT[bResult of splititng a treeSplitting and extractingCA pair that is strict in its first argument and lazy in the second.A balanced binary search tree!Describes how to search in a treeCreates an empty BST O(n\log n)Check if the tree is empty'Test if an element occurs in the BST.  O(\log n) O(\log n) Insert an element in the BST. O(\log n)!#Extract the minimum from the tree  O(\log n)"#Extract the maximum from the tree  O(\log n)#PJoins two BSTs. Assumes that the ranges are disjoint. It takes the left Tree nav O(\log n)$.Joins two BSTs' with a specific Tree Navigator O(\log n)&0Extract a prefix from the tree, i.e. a repeated ! O(\log n +k), where k" is the size of the extracted part'0Extract a suffix from the tree, i.e. a repeated ! O(\log n +k), where k" is the size of the extracted part(dSplits the tree at x. Note that if x occurs more often, no guarantees are given which one is found. O(\log n))$split based on a monotonic predicate O(\log n)*fSplits at a given monotone predicate p, and then selects everything that satisfies the predicate sel.-:Get the minimum in the tree. Errors when the tree is empty O(\log n).:Get the maximum in the tree. Errors when the tree is empty O(\log n)/ Extract all elements in the treeO(n)0 Extract all elements in the treeO(n)4rebalance the tree:      !"#$%&'()*+,-./0123456788      !"#$%&'()*+,-./0123456:87      !"#$%&'()*+,-./0123456)      !"#$%&'()*+,-./0123456782None$%&*+,/0123459:;<=DILOQRT[bI&Note that the functor instance is in vg=The Face data consists of the data itself and a list of holes{-Construct a planar subdivision from a polygonrunning time: O(n).}*Constructs a connected planar subdivision.Cpre: the segments form a single connected component running time:  O(n\log n)~Constructs a planar graph3pre: The segments form a single connected componentrunning time:  O(n\log n)IJKLSTUVWXYZ[\ghijklstuvwz{ data insidedata outside the polygon|}~IJKLSTUVWXYZ[ghijklstuvwz{|}~IJKL[Z\WXYSTUVlkghijwvstuz{|}~IJKLSTUVWXYZ[\ghijklstuvwz{|}~3None$%&*+,/0123459:;<=DILOQRT[b;A State monad that can store earlier versions of the state.WCreate a snapshot of the current state and add it to the list of states that we store.run a persistentStateT, returns a triplet with the value, the last state and a list of all states (including the last one) in chronological order    4None$%&*+,/0123459:;<=DILOQRT[b7Given a list xs, generate all unique (unordered) pairs.All unieuqe unordered triplets.5None$%&*+,/0123459:;<=DILOQRT[bcAdjacency list representation of a graph: for each vertex we simply list all connected neighbours.DFS on a planar graph.Running time: O(n)wNote that since our planar graphs are always connected there is no need need for dfs to take a list of start vertices.+Transform into adjacencylist representationFDFS, from a given vertex, on a graph in AdjacencyLists representation.Running time: O(n)6None$%&*+,/0123459:;<=DILOQRT[b  Union find DSMinimum spanning tree of the edges. The result is a rooted tree, in which the nodes are the vertices in the planar graph together with the edge weight of the edge to their parent. The root's weight is zero. The algorithm used is Kruskal's.running time:  O(n \log n)6Computes the set of edges in the Minimum spanning treerunning time:  O(n \log n)_Given an underlying planar graph, and a set of edges that form a tree, create the actual tree..pre: the planar graph has at least one vertex. ~Union the components containing x and y. Returns weather or not the two components were already in the same component or not. !Get the representative of the component containing x find :: (Enum a, Eq a) => UF s a -> a -> ST s a find uf = fmap fst . find' ufCget the representative (and its rank) of the component containing x  " # $ !  " # $ !7None$%&*+,/0123459:;<=DILOQRT[b$Data that we store in the split tree##8None$%&*+,/0123459:;<=DILOQRT[bCST monad with access to the vector storign the level of the points.Construct a split treerunning time:  O(n \log n)5Given a split tree, generate the Well separated pairsrunning time: O(s^d n)KGiven the points, sorted in every dimension, recursively build a split treeThe algorithm works in rounds. Each round takes O(n) time, and halves the number of points. Thus, the total running time is O(n log n).The algorithm essentially builds a path in the split tree; at every node on the path that we construct, we split the point set into two sets (L,R) according to the longest side of the bounding box.The smaller set is "assigned" to the current node and set asside. We continue to build the path with the larger set until the total number of items remaining is less than n/2.`To start the next round, each node on the path needs to have the points assigned to that node, sorted in each dimension (i.e. the Vector (PointSeq))'s. Since we have the level assignment, we can compute these lists by traversing each original input list (i.e. one for every dimension) once, and partition the points based on their level assignment.2Assign the points to their the correct class. The  %$ class is considered the last class2Assign the points to their the correct class. The  %$ class is considered the last classGiven a sequence of points, whose index is increasing in the first dimension, i.e. if idx p < idx q, then p[0] < q[0]. Reindex the points so that they again have an index in the range [0,..,n'], where n' is the new number of points.Xrunning time: O(n' * d) (more or less; we are actually using an intmap for the lookups)alternatively: I can unsafe freeze and thaw an existing vector to pass it along to use as mapping. Except then I would have to force the evaluation order, i.e. we cannot be in ( for two of the nodes at the same time.0so, basically, run reIndex points in ST as well.Assigns the points to a level. Returns the list of levels used. The first level in the list is the level assigned to the rest of the nodes. Their level is actually still set to Nothing in the underlying array.9Remove already assigned pts from the ends of all vectors.Assign level l to point pGet the level of a point5Test if the point already has a level assigned to it.1Remove allready assigned points from the sequencepre: there are points remainingGiven the points, ordered by their j^th coordinate, split the point set into a "left" and a "right" half, i.e. the points whose j^th coordinate is at most the given mid point m, and the points whose j^th coordinate is larger than m.,We return a pair (Largest set, Smallest set)fi ndAndCompact works by simultaneously traversing the points from left to right, and from right to left. As soon as we find a point crossing the mid point we stop and return. Thus, in principle this takes only O(|Smallest set|) time.running time: O(|Smallest set|) + R, where R is the number of *old* points (i.e. points that should have been removed) in the list.*Find the widest dimension of the point set3pre: points are sorted according to their dimension]get the extends of the set of points in every dimension, i.e. the left and right boundaries.3pre: points are sorted according to their dimension4Test if the two sets are well separated with param s1Test if the two boxes are sufficiently far appart)Computes the maximum width of a splitTreeComputes! the bounding box of a split treeTurn a traversal into lensnumber of classeslevel assignment input points"Number of items we need to collect#Number of items we collected so farnext level to useLevels used so farWthe dimension we are in, i.e. so that we know which coordinate of the point to compare the mid pointseparation factor9None$%&*+,/0123459:;<=DILOQRT[beThe result of a smallest enclosing disk computation: The smallest ball and the points defining itList of two or three elements   :None$%&*+,/0123459:;<=DILOQRT[bO(n) expected time algorithm to compute the smallest enclosing disk of a set of points. we need at least two points. implemented using randomized incremental constructionSmallest enclosing disk.6Smallest enclosing disk, given that p should be on it.;Smallest enclosing disk, given that p and q should be on itConstructs the initial  from two points;None$%&*+,/0123459:;<=DILOQRT[bHorrible O(n^4) implementation that simply tries all disks, checks if they enclose all points, and takes the largest one. Basically, this is only useful to check correctness of the other algorithm(s)BGiven a list of canidate enclosing disks, report the smallest one.#check if a disk encloses all points<None$%&*+,/0123459:;<=DILOQRT[bLine simplification with the well-known Douglas Peucker alogrithm. Given a distance value eps adn a polyline pl, constructs a simplification of pl (i.e. with vertices from pl) s.t. all other vertices are within dist eps to the original polyline.5Running time: O(n^2) worst case, O(n log n) expected.;Concatenate the two polylines, dropping their shared vertexJSplit the polyline at the given vertex. Both polylines contain this vertexGiven a sequence of points, find the index of the point that has the Furthest distance to the LineSegment. The result is the index of the point and this distance.=None$%&*+,/0123459:;<=DILOQRT[b                     >None$%&*+,/0123459:;<=DILOQRT[b#Compute all intersections (naively)O(n^2)HTest if the two segments intersect, and if so add the segment to the map"Add s and s' to the map with key p(figure out which map to add the point to ! ! ! !?None$%&*+,/0123459:;<=DILOQRT[b$1The actual event consists of a point and its type(Type of segment,Compute all intersectionsO((n+k)\log n), where k is the number of intersections.-/Group the segments with the intersection points.\Group the startpoints such that segments with the same start point correspond to one event./4An ordering that is decreasing on y, increasing on x04Get the segments that start at the given event point1lThe navigator that we use that orders the segments that intersect at a horizontal line (from left to right)2!Run the sweep handling all events3Handle an event point4jsplit the status structure, extracting the segments that contain p. the result is (before,contains,after)5`Given a point and the linesegements that contain it. Create a piece of status structure for it.6#Get the right endpoint of a segment7Test if a segment ends at p8Find all events"#$%&'()*+,-./0123456789:;"#$%&'()*+,-./012345678,-.()*+;:$%&'9/01#"2345678"#$%&'()*+,-./0123456789:;@None$%&*+,/0123459:;<=DILOQRT[b@BComputes the Euclidean diametral pair by naively trying all pairs.running time: O(n^2)AmGiven a distance function and a list of points pts, computes the diametral pair by naively trying all pairs.running time: O(n^2)?@A?@A?@A?@AANone $%&*+,/0123459:;<=DILOQRT[bBeNeighbours are stored in clockwise order: i.e. rotating right moves to the next clockwise neighbour.IRotating Right  - rotate clockwiseL*ST' is a strict triple (m,a,x) containing:fm: a Map, mapping edges, represented by a pair of vertexId's (u,v) with u < v, to arcId's."a: the next available unused arcID0x: the data value we are interested in computing[2convert the triangulation into a planarsubdivisionrunning time:  O(n\log n).\,convert the triangulation into a plane graphrunning time:  O(n\log n).BCDEFGHILMNOPQRSTUVWXYZ[\BCDEFGHILMNOPQRSTUVWXYZ[\IHGBCDEFVUTSWXYZNOPQRML[\BCDEFGHILMNOPQRSTUVWXYZ[\BNone$%&*+,/0123459:;<=DILOQRT[b]Naive O(n^4) time implementation of the delaunay triangulation. Simply tries each triple (p,q,r) and tests if it is delaunay, i.e. if there are no other points in the circle defined by p, q, and r.pre: the input is a *SET*, i.e. contains no duplicate points. (If the input does contain duplicate points, the implementation throws them away)^pGiven a list of edges, as vertexId pairs, construct a vector with the adjacency lists, each in CW sorted order._Given a particular point u and a list of points vs, sort the points vs in CW order around u. running time: O(m log m), where m=|vs| is the number of vertices to sort.`0Given a list of faces, construct a list of edgesaaTest if the given three points form a triangle in the delaunay triangulation. running time: O(n)]^_`a]^_`a]^_`a]^_`aCNone$%&*+,/0123459:;<=DILOQRT[bb O(n \log n)W time ConvexHull using Graham-Scan. The resulting polygon is given in clockwise order. &gHelper function so that that can compute both the upper or the lower hull, depending on the function f '0Precondition: The list of input points is sortedbcd & ( ' )bcdbcdbcd & ( ' )DNone$%&*+,/0123459:;<=DILOQRT[bg7Computes the delaunay triangulation of a set of points.Running time:  O(n \log n)C (note: We use an IntMap in the implementation. So maybe actually  O(n \log^2 n))pre: the input is a *SET*, i.e. contains no duplicate points. (If the input does contain duplicate points, the implementation throws them away)iMapping that says for each vtx in the convex hull what the first entry in the adj. list should be. The input polygon is given in Clockwise orderjXGiven a polygon; construct the adjacency list representation pre: at least two elementsk&Merge the two delaunay triangulations.running time: O(n), (although we cheat a bit by using a IntMap)l'Merges the two delaunay traingulations.m'rotates'= around r and removes all neighbours of r that violate the delaunay condition. Returns the first vertex (as a Neighbour of r) that should remain in the Delaunay Triangulation, as well as a boolean A that helps deciding if we merge up by rotating left or rotating right (See description in the paper for more info)n&The code that does the actual rotatingoSymmetric to rotateRp=The code that does the actual rotating. Symmetric to rotateR'qereturns True if the forth point (vertex) does not lie in the disk defined by the first three points.r(Inserts an edge into the right position.sNmake sure that the first vtx in the adj list of v is its predecessor on the CHthInserts an edge (and makes sure that the vertex is inserted in the correct. pos in the adjacency lists)uDeletes an edgev!Lifted version of Convex.IsLeftOfw"Lifted version of Convex.IsRightOfzan unsafeO version of rotateTo that assumes the element to rotate to occurs in the list.{IAdjacency lists are stored in clockwise order, so pred means rotate right|KAdjacency lists are stored in clockwise order, so pred and succ rotate left~%Removes duplicates from a sorted listefghijk lower tangent upper tangentlmnopqrstuvwxyz{|}~efghijklmnopqrstuvwxyz{|}~ghijkfelmnopqrstuvwxyz{|}~efghijklmnopqrstuvwxyz{|}~ENone$%&*+,/0123459:;<=DILOQRT[bComputes the Euclidean Minimum Spanning Tree. We compute the Delaunay Triangulation (DT), and then extract the EMST. Hence, the same restrictions apply as for the DT:pre: the input is a *SET*, i.e. contains no duplicate points. (If the input does contain duplicate points, the implementation throws them away)running time:  O(n \log n)FNone$%&*+,/0123459:;<=DILOQRT[b O(n \log n), time ConvexHull using divide and conqueror. * + , * + , -MNOMNPMNQMNRMNSMNTMNUMVWMVXYZ[[\\]^_`abcdefghijklmnopqrstuvwxtvyz{|}~                       ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ABCDE F G H I J K L M N O P P Q R S T U V W X I I Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                                                                                                                   U                                      ! " # $ % & ' ( ) * * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A BCCDEFGHIIJKLMNOPQRSSTUVWXYZ[\]^_`abcdefghijklmnopqrsthuvwxyz{|}~       !"#$%&'()*+,-./01234566789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZZ[\]^_`abcdefghijklmmnopqrstuvwxyz{|}~w         ! "   # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8!9!9!:!;!<!=!>!?!@!A!B!C!D!E!F!G!H!I"J"K"L"K"J"M"N"O"P"Q"R"S"T"U"<"V"W"X"Y"Z"["\"]"^"_"`"a"b"c"d"e"f"g"h#i#i#j#k#l#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#z#{#|#}#~#w################################################################################################################################################# # # # # # ###############$$$$ %!%"%#%$%%%%&%'%(%)%*%+%,%-%.%/%0%1%2%3%4%5%6%7%8%9%:&;&<&=&>&?&@&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&X&Y&Z&[&\&]&^&_&`&a&b&c&d&e&f&g&h&i&j'k'l'm'n'o'p'q'r's't'u'v'w'x'y'z'{'|'}'~''''''''''''''''''''''''''''''''''''''''''(((((((((((((((((((())))))))))))))))))))))))))))))))))***[*******+++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, , , , , ,,,,,,,,,,,,,,,,,,, ,!,",#,$,%,&,',(,),*,+,,,-,.,/,0,1,2,3,4,5,6,7-8-9-:-v-C-I-;-<-=->-?-@-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q.R.R.S.T.U.V.W.X.Y.Z.[.[.\.].^._.`.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o/p/q/r/s/t/u/v/w/x/x/y/y/z/{/|/}/~///////////////////0R0R0S000V0W00Y0000000_00Z00000000000000000000000000000g0h0j0k0l0m0000000000000000000000000607080900111q1x1x111]1^1s1r11111111111111111111111l111111111111111i111111111111111111111111122222222 2 2 2 2 2 22222222222222222222 2!2"2#2$2%2&2'2(2)2*2*2+2,2Q2-2.2/202122232435363738393:3;3<3=4>4>4[4[4?4@4A4l4m4k4B4C4D5E5F5G5H6I6J6K7R7R7L7M7N7O7p7P7W7V7Q7Q7R7S7T7U7V7W7X7Y77Z7[7\7]7^7_7`7a7b7c7C7I7d7e7f7g7h7i7j7k7l7m7n8o8p8q8r8s8t8u8v8w8x8y8z8{8|8}8~88888888888888999999Z9999999999:::::;;;;;;<<<<======================>>>>>>?????????O????????????????????@@@AAAAAAAAAAAAA>A>A]A^A_AAAAAAAAAABBBBBCCCDDDDDDDDDDDDDDlDDDmDDDDDDDDDDDEEEE FF [ [  .MMMMMMMMMM M!M!M"M#M$M%M&M'M(M) * + , - .G/G0G1G2G3G4G5G6G7G8G9G:G;G<G=G>G?G@GAGBGGCGDGEFGHFIJKLMNOPQRSTUVWXYZ[\]^_`abMNcdefMNgMNhMNiMNjMNk&l&m&n&o&p&&q&r&s&t&u&v(w(x(y(z({(|(}(((~(((...000i0000000000000.000036366G6666CCCCFFF'hgeometry-0.6.0.0-ODn7ZyBfwj6IkLPAAzetJData.Geometry.VectorSystem.Random.Shuffle Data.UtilData.UnBoundedData.Sequence.Util Data.Seq2Data.SeqData.Permutation Data.Geometry.Vector.VectorFixedData.Geometry.Properties Data.RangeData.Geometry.Ipe.LiteralData.Geometry.Ipe.AttributesData.Geometry.Interval.UtilData.ExtData.Geometry.IntervalData.PlanarGraphData.CircularSeqData.CircularList.UtilData.Geometry.PointData.Geometry.Line.InternalData.Geometry.SubLineData.Geometry.TransformationData.Geometry.BoundaryData.Geometry.Box.InternalData.Geometry.LineSegmentData.Geometry.BoxData.Geometry.LineData.Geometry.BallData.Geometry.DualityData.Geometry.HalfLineData.Geometry.SlabData.Geometry.PolyLineData.Geometry.PolygonData.Geometry.Ipe.TypesData.Geometry.Ipe.FromIpeData.Geometry.Ipe.PathParserData.Geometry.Ipe.ReaderData.Geometry.Ipe.WriterData.Geometry.Polygon.ConvexData.Geometry.Ipe.IpeOutData.Geometry.TriangleData.PlaneGraphData.BinaryTreeData.BinaryTree.ZipperData.Geometry.IntervalTreeData.Geometry.KDTree!Data.Geometry.SegmentTree.Generic Data.BalBSTData.Geometry.PlanarSubdivisionControl.Monad.State.PersistentAlgorithms.UtilAlgorithms.Graph.DFSAlgorithms.Graph.MST8Algorithms.Geometry.WellSeparatedPairDecomposition.Types7Algorithms.Geometry.WellSeparatedPairDecomposition.WSPD/Algorithms.Geometry.SmallestEnclosingBall.TypesKAlgorithms.Geometry.SmallestEnclosingBall.RandomizedIncrementalConstruction/Algorithms.Geometry.SmallestEnclosingBall.Naive9Algorithms.Geometry.PolyLineSimplification.DouglasPeucker1Algorithms.Geometry.LineSegmentIntersection.Types1Algorithms.Geometry.LineSegmentIntersection.Naive:Algorithms.Geometry.LineSegmentIntersection.BentleyOttmannAlgorithms.Geometry.Diameter/Algorithms.Geometry.DelaunayTriangulation.Types/Algorithms.Geometry.DelaunayTriangulation.Naive)Algorithms.Geometry.ConvexHull.GrahamScanViewR2:>>ViewL1:<ViewL2:<<Seq2duoindexadjust partition<||>><fromList mapWithIndextakedroptoSeq fromSeqUnsafeheadL1 toNonEmptyviewL1FromNonEmpty viewL1FromSeqviewl l1Singleton viewL1toR1viewr r1Singleton$fFoldableViewR1$fFunctorViewR1$fTraversableViewR1$fFoldableViewR2$fFunctorViewR2$fTraversableViewR2$fSemigroupViewL1$fFoldableViewL1$fFunctorViewL1$fTraversableViewL1 $fShowViewL1$fFoldableViewL2$fFunctorViewL2$fTraversableViewL2 $fIxedSeq2$fSemigroupSeq2$fFoldableSeq2 $fFunctorSeq2$fTraversableSeq2$fEqSeq2 $fOrdSeq2 $fShowSeq2 $fEqViewL1 $fOrdViewL1 $fShowViewR2 $fEqViewR2 $fOrdViewR2 $fShowViewR1 $fReadViewR1 $fEqViewR1 $fOrdViewR1 $fShowViewL2 $fEqViewL2 $fOrdViewL2ViewRViewLLSeq:|>EmptyL:<|emptyevalpromiseunstableSortByfromSeq fromNonEmpty $fOrdViewR $fEqViewR$fTraversableViewR$fFoldableViewR$fFunctorViewR$fSemigroupViewR $fOrdViewL $fEqViewL$fTraversableViewL$fFoldableViewL$fFunctorViewL$fSemigroupViewL $fIxedLSeq $fMonoidLSeq$fSemigroupLSeq $fShowLSeq $fReadLSeq$fEqLSeq $fOrdLSeq$fFoldableLSeq $fFunctorLSeq$fTraversableLSeq $fShowViewR $fShowViewL Permutation_orbits_indexesOrbit$fShowPermutation$fEqPermutationindexesorbitselemssizecycleOfnext lookupIdxapply orbitFromcycleRep toCycleRep genIndexesix'$fTraversablePermutation$fFoldablePermutation$fFunctorPermutationPrefixprefix'AlwaysTrueSnocAlwaysTrueDestructIndex'ArityVector_unVCVector3Vector2unVelementelement'vectorFromListvectorFromListUnsafedestructcrosstoV3fromV3snocinitprefiximapv2v3_unV2_unV3 $fPrefixSS $fPrefixZd$fVectorVectorr$fMetricVector$fAffineVector$fAdditiveVector$fTraversableVector $fShowVector$fShowC$fReadC$fEqC$fOrdC$fGenericVector$fNFDataVector$fApplicativeVector$fFoldableVector$fFunctorVector $fOrdVector $fEqVectorisScalarMultipleOfscalarMultiple$fMonoidScalarMultiple$fEqScalarMultiple$fShowScalarMultipleIsUnionableWithunionUnionAlwaysTrueIntersectionIsIntersectableWith intersect intersectsnonEmptyIntersectionIntersectionOf IntersectionNoIntersectionNumType DimensioncoRecdefaultNonEmptyIntersection$fShowNoIntersection$fReadNoIntersection$fEqNoIntersection$fOrdNoIntersection_lower_upperEndPointOpenClosed unEndPointisOpenisClosed $fOrdEndPoint$fShowEndPoint$fReadEndPoint $fEqEndPoint$fFunctorEndPoint$fFoldableEndPoint$fTraversableEndPoint$fGenericEndPoint$fNFDataEndPoint $fEqRange$fFunctorRange$fFoldableRange$fTraversableRange$fGenericRange $fNFDataRangeRange' ClosedRange OpenRangelowerupper prettyShowinRangewidthmidPoint clipLower clipUppercoversisValid shiftLeft shiftRight$fIsIntersectableWithRangeRange $fShowRange literallylitlitFile xmlLiteralAttributeUniverseLayerMatrixPinTransformationsStrokeFillPenSizeDashLineCapLineJoinFillRuleArrowRArrowOpacityTilingGradientClip$fShowAttributeUniverse$fReadAttributeUniverse$fEqAttributeUniverseAttrGAttr_getAttrGroupAttributesPathAttributesSymbolAttributesImageAttributesMiniPageAttributesTextLabelAttributesCommonAttributesSAttributeUniverseClipSym0 GradientSym0 TilingSym0 OpacitySym0 RArrowSym0 ArrowSym0 FillRuleSym0 LineJoinSym0 LineCapSym0DashSym0SizeSym0PenSym0FillSym0 StrokeSym0TransformationsSym0PinSym0 MatrixSym0 LayerSym0SLayerSMatrixSPinSTransformationsSStrokeSFillSPenSSizeSDashSLineCap SLineJoin SFillRuleSArrowSRArrowSOpacitySTiling SGradientSClip$fSingIAttributeUniverseClip $fSingIAttributeUniverseGradient$fSingIAttributeUniverseTiling$fSingIAttributeUniverseOpacity$fSingIAttributeUniverseRArrow$fSingIAttributeUniverseArrow $fSingIAttributeUniverseFillRule $fSingIAttributeUniverseLineJoin$fSingIAttributeUniverseLineCap$fSingIAttributeUniverseDash$fSingIAttributeUniverseSize$fSingIAttributeUniversePen$fSingIAttributeUniverseFill$fSingIAttributeUniverseStroke'$fSingIAttributeUniverseTransformations$fSingIAttributeUniversePin$fSingIAttributeUniverseMatrix$fSingIAttributeUniverseLayerD:R:DemoteRepAttributeUniverse$fSingKindAttributeUniverse $fOrdAttr$fEqAttr $fReadAttr $fShowAttr AttributesAttrs_unAttrsNoAttrgetAttr $fMonoidAttrIpeArrow _arrowName _arrowSize IpeGradient IpeTiling IpeOpacityFillTypeWindEOFillIpeDash DashNamed DashPatternIpeColorIpePenIpeSizeColourIpeValueNamedValuedTransformationTypesRigid TranslationsPinTypeNoYes HorizontalVerticalunAttrs zipRecsWithattrLens lookupAttrsetAttrtakeAttr unSetAttrattr$fIsStringIpeValue$fSemigroupAttributes$fMonoidAttributes$fEqAttributes $fEqPinType $fShowPinType $fReadPinType$fShowTransformationTypes$fReadTransformationTypes$fEqTransformationTypes$fShowIpeValue $fEqIpeValue $fOrdIpeValue $fShowIpeSize $fEqIpeSize $fOrdIpeSize $fShowIpePen $fEqIpePen $fOrdIpePen$fShowIpeColor $fEqIpeColor $fOrdIpeColor $fShowIpeDash $fEqIpeDash$fShowFillType$fReadFillType $fEqFillType$fShowIpeArrow $fEqIpeArrow$fShowAttributes AllSatisfyGDict IpeAttrNameattrName arrowName arrowSize normalArrowwriteAttrNames$fIpeAttrNameClip$fIpeAttrNameGradient$fIpeAttrNameTiling$fIpeAttrNameOpacity$fIpeAttrNameRArrow$fIpeAttrNameArrow$fIpeAttrNameFillRule$fIpeAttrNameLineJoin$fIpeAttrNameLineCap$fIpeAttrNameDash$fIpeAttrNameSize$fIpeAttrNamePen$fIpeAttrNameFill$fIpeAttrNameStroke$fIpeAttrNameTransformations$fIpeAttrNamePin$fIpeAttrNameMatrix$fIpeAttrNameLayerL_unL$fShowL$fEqL $fGenericL $fNFDataLR_unRunL$fOrdL$fShowR$fEqR$fOrdR $fGenericR $fNFDataRunR:+_core_extracoreextraext $fSemigroup:+$fBitraversable1:+$fBifoldable1:+$fBitraversable:+$fBifoldable:+$fBiapplicative:+ $fBiapply:+ $fBifunctor:+$fShow:+$fRead:+$fEq:+$fOrd:+ $fBounded:+ $fGeneric:+ $fNFData:+Interval GInterval _unInterval $fEqInterval$fGenericIntervalHasEndEndCoreEndExtraendHasStart StartCore StartExtrastartClosedInterval OpenInterval inInterval shiftLeft'%$fIsIntersectableWithIntervalInterval$fHasEndInterval$fHasStartInterval$fBifunctorInterval$fTraversableInterval$fFoldableInterval$fFunctorInterval$fShowInterval$fNFDataIntervalDart_arc _direction DirectionNegativePositiveArc_unArcrev$fReadDirection$fShowDirection $fShowArc$fEqArc$fOrdArc $fEnumArc $fBoundedArc $fEqDirection$fOrdDirection$fBoundedDirection$fEnumDirection$fEqDart $fOrdDartVertexId _unVertexIdDualWorldPrimal_Dual_arc directiontwin isPositive $fEnumDart $fShowDart $fShowWorld $fEqWorld $fEqVertexId $fOrdVertexId$fEnumVertexId PlanarGraph$fShowVertexId$fShowPlanarGraph$fEqPlanarGraph EdgeOracleFaceId _unFaceId embeddingfaceData vertexDatadartDataedgeData planarGraph' planarGraphfromAdjacencyLists numVerticesnumDartsnumEdgesnumFaces vertices'verticesdarts'dartsedges'edgestailOfheadOf endPoints incidentEdges incomingEdges outgoingEdges neighboursOfvDataOfeDataOffDataOfendPointDataOf endPointDatadualfaces'facesleftFace rightFaceboundaryboundaryVertices edgeOraclebuildEdgeOraclehasEdgefindEdge$fTraversableEdgeOracle$fFoldableEdgeOracle$fFunctorEdgeOracle $fShowFaceId $fEqFaceId $fOrdFaceId$fShowEdgeOracle$fEqEdgeOracleCSeq singletonfocusitemcseqrotateRrotateLasSeq rightElements leftElementsrotateNRrotateNLreverseDirection findRotateTorotateTo allRotationszipLWithzipL zip3LWith insertOrd insertOrdBy isShiftOf $fFunctorCSeq$fFoldableCSeq$fFoldable1CSeq$fTraversableCSeq $fShowCSeq$fEqCSeq insertOrdBy' splitIncrQuadrantTopRightTopLeft BottomLeft BottomRightCCWCoLinearCW PointFunctorpmap<=.PointtoVecPoint3Point2originvector unsafeCoordcoord pointFromListpoint2_point2point3_point3xCoordyCoordzCoordccw sortArround quadrantWithquadrantpartitionIntoQuadrants ccwCmpAround cwCmpAroundinsertIntoCyclicOrdersquaredEuclideanDist euclideanDist$fPointFunctorPoint $fAffinePoint $fShowPoint$fGenericPoint $fShowCCW$fEqCCW$fShowQuadrant$fReadQuadrant $fEqQuadrant $fOrdQuadrant$fEnumQuadrant$fBoundedQuadrant $fNFDataPoint$fTraversablePoint$fFoldablePoint$fFunctorPoint $fOrdPoint $fEqPointLine _anchorPoint $fGenericLineSideTestBelowOnAboveHasSupportingLinesupportingLine anchorPoint lineThrough verticalLinehorizontalLineperpendicularTo isIdenticalTo isParallelToonLine sqDistanceTosqDistanceToArgfromLinearFunctiontoLinearFunctiononSide liesAbovebisector$fHasSupportingLineLine$fIsIntersectableWithLineLine $fShowLine$fShowSideTest$fReadSideTest $fEqSideTest $fOrdSideTest$fTraversableLine$fFoldableLine $fFunctorLine $fNFDataLine$fEqLineSubLine_line _subRangelinesubRangepointAt fixEndPointstoOffsetfromLine#$fIsIntersectableWithSubLineSubLine$fTraversableSubLine$fFoldableSubLine$fFunctorSubLine $fEqSubLine $fShowSubLineAlwaysTrueTransformation AlwaysTruePFTIsTransformable transformByTransformation_transformationMatrixmultMmulttransformationMatrix|.|transformAllBytransformPointFunctor translationscalinguniformScaling translateByscaleByscaleUniformlyBymkRowtransRow$fIsTransformablePoint$fFunctorTransformation$fOrdTransformation$fEqTransformation$fShowTransformation$fFunctorMatrix $fOrdMatrix $fEqMatrix $fShowMatrixPointLocationResultInside OnBoundaryOutsideBoundary$fShowBoundary $fEqBoundary $fOrdBoundary$fReadBoundary$fIsTransformableBoundary$fShowPointLocationResult$fReadPointLocationResult$fEqPointLocationResultCWMin_cwMin $fShowCWMin $fEqCWMin $fOrdCWMin$fFunctorCWMin$fFoldableCWMin$fTraversableCWMin$fGenericCWMin $fNFDataCWMinCWMax_cwMaxcwMin$fSemigroupCWMin $fShowCWMax $fEqCWMax $fOrdCWMax$fFunctorCWMax$fFoldableCWMax$fTraversableCWMax$fGenericCWMax $fNFDataCWMaxBox_minP_maxPcwMax$fSemigroupCWMax $fGenericBox IsBoxable boundingBox RectanglemaxPminPbox fromExtent centerPointminPointmaxPointinBoxextentwidthInwidthIn'heightcornersboundingBoxListboundingBoxList'$fIsBoxableBox$fIsBoxablePoint$fIsTransformableBox$fPointFunctorBox$fIsIntersectableWithPointBox$fIsIntersectableWithBoxBox$fSemigroupBox$fOrdBox$fEqBox $fShowBox LineSegmentClosedLineSegment LineSegment'_SubLine toLineSegment onSegmentorderedEndPoints segmentLengthsqDistanceToSegsqDistanceToSegArg flipSegment$$fIsIntersectableWithLineSegmentLine+$fIsIntersectableWithLineSegmentLineSegment$fBifunctorLineSegment$fIsTransformableLineSegment$fIsBoxableLineSegment$fPointFunctorLineSegment$fShowLineSegment$fHasSupportingLineLineSegment$fHasEndLineSegment$fHasStartLineSegment$fFunctorLineSegment$fEqLineSegmenttopSide bottomSideleftSide rightSidesidessides' $fNFDataBox$fIsTransformableLineBall_center_squaredRadius $fGenericBallTouchingCircleDiskSpherecenter squaredRadiusradius fromDiameterfromCenterAndPointunitBallinBall insideBall inClosedBallonBalldisk from3Points($fIsIntersectableWithLineSegmentBoundary!$fIsIntersectableWithLineBoundary$fBifunctorBall $fFunctorBall$fShowTouching $fEqTouching $fOrdTouching$fFunctorTouching$fFoldableTouching$fTraversableTouching$fEqBall $fShowBalldualLine dualPoint dualPoint'HalfLine _startPoint_halfLineDirection$fGenericHalfLinehalfLineDirection startPointhalfLineToSubLine fromSubLine onHalfLine toHalfLine$fIsTransformableHalfLine$fHasSupportingLineHalfLine$fHasStartHalfLine$fTraversableHalfLine$fFoldableHalfLine$fFunctorHalfLine$fNFDataHalfLine $fEqHalfLine$fShowHalfLineSlab_unSlab Orthogonal$fShowOrthogonal$fEqOrthogonal$fReadOrthogonal $fShowSlab$fEqSlabHasBoundingLines boundingLinesinSlabunSlabhorizontalSlab verticalSlabtest $fIsIntersectableWithSubLineSlab$fIsIntersectableWithLineSlab$fHasBoundingLinesVertical$fHasBoundingLinesHorizontal$fIsIntersectableWithSlabSlab$fIsIntersectableWithSlabSlab0$fBifunctorSlab$fTraversableSlab$fFoldableSlab $fFunctorSlabPolyLine_pointspoints fromPoints fromPoints'fromLineSegment asLineSegmentasLineSegment'$fBifunctorPolyLine$fPointFunctorPolyLine$fIsTransformablePolyLine$fIsBoxablePolyLine$fSemigroupPolyLine$fFunctorPolyLine $fOrdPolyLine $fEqPolyLine$fShowPolyLine MultiPolygon SimplePolygonPolygon PolygonTypeSimpleMulti outerBoundaryholes outerVertexouterBoundaryEdgeholeListpolygonVerticesouterBoundaryEdgestoEdges onBoundary inPolygon insidePolygonarea signedAreacentroidisCounterClockwisetoClockwiseOrdertoCounterClockWiseOrderasSimplePolygon cmpExtremeextremesLinear$fIsBoxablePolygon$fIsTransformablePolygon$fPointFunctorPolygon $fEqPolygon $fShowPolygonImage _imageData_rect LayerName _layerName$fShowLayerName$fReadLayerName $fEqLayerName$fOrdLayerName$fIsStringLayerName $fShowImage $fEqImage $fOrdImage IpeSymbolSymbol _symbolPoint _symbolNameMiniPage TextLabelLabel imageDatarect$fIsTransformableMiniPage$fIsTransformableTextLabel$fIsTransformableImage$fShowTextLabel $fEqTextLabel$fOrdTextLabel$fShowMiniPage $fEqMiniPage $fOrdMiniPage$fShowIpeSymbol $fEqIpeSymbol$fOrdIpeSymbol PathSegmentPolyLineSegment PolygonPathCubicBezierSegmentQuadraticBezierSegmentEllipseSegment ArcSegment SplineSegmentClosedSplineSegment symbolName symbolPoint$fIsTransformableIpeSymbol$fShowPathSegment$fEqPathSegmentPath _pathSegments_PolyLineSegment _PolygonPath_CubicBezierSegment_QuadraticBezierSegment_EllipseSegment _ArcSegment_SplineSegment_ClosedSplineSegment$fIsTransformablePathSegment $fShowPath$fEqPath OperationMoveToLineToCurveToQCurveToEllipseArcToSpline ClosedSpline ClosePath pathSegments$fIsTransformablePath $fEqOperation$fShowOperationAttrMap_MoveTo_LineTo_CurveTo _QCurveTo_Ellipse_ArcTo_Spline _ClosedSpline _ClosePath IpeObjectIpeGroupIpeImage IpeTextLabel IpeMiniPageIpeUseIpePath IpeObject' IpeAttributes Attributes' AttributesOfGroup _groupItems AttrMapSym0AttrMapSym0KindInference AttrMapSym1AttrMapSym1KindInference AttrMapSym2 attributes$fIsTransformableGroupD:R:ApplyTYPE(->)AttrMapSym0l0'$fSuppressUnusedWarnings(->)AttrMapSym0'$fSuppressUnusedWarnings(->)AttrMapSym1 $fShowGroup $fEqGroup $fEqIpeObject$fShowIpeObject _IpeGroup _IpeImage _IpeTextLabel _IpeMiniPage_IpeUse_IpePathView _layerNames _activeLayerToObject ipeObject' groupItemscommonAttributes$fIsTransformableIpeObject$fToObjectPath$fToObjectIpeSymbol$fToObjectMiniPage$fToObjectTextLabel$fToObjectImage$fToObjectGroup$fEqView $fOrdView $fShowViewIpeStyle _styleName _styleData activeLayer layerNames $fEqIpeStyle$fShowIpeStyle IpePreamble _encoding _preambleData styleData styleName basicIpeStyle$fEqIpePreamble$fReadIpePreamble$fShowIpePreamble$fOrdIpePreambleIpePage_layers_views_content IpeBitmapencoding preambleData $fEqIpePage $fShowIpePageIpeFile _preamble_styles_pagescontentlayersviews fromContent $fEqIpeFile $fShowIpeFilepagespreamblestylessinglePageFilesinglePageFromContent applyMatrix' applyMatrix applyMatricesapplyMatricesPage_asLineSegment _asPolyLine_asSimplePolygon _withAttrsEither'Left'Right' CoordinatedefaultFromSeqreadCoordinate readPoint runParsereither'readPathOperations errorText combineErrorssplitKeepDelims readMatrix readRectangle pOperationpPoint pCoordinate pRectanglepMatrixmkMatrix$fMonoidEither'$fCoordinateRatio$fCoordinateDouble $fShowEither' $fEqEither' IpeReadAttr ipeReadAttrIpeReadipeRead IpeReadText ipeReadTextConversionErrorreadRawIpeFile readIpeFilereadSinglePageFile fromIpeXMLreadXMLipeReadTextWith ipeReadRec ipeReadAttrs ipeReadObject$fIpeReadPathSegment$fIpeReadPolyLine$fIpeReadTextPolyLine$fIpeReadIpeFile$fIpeReadIpePage $fIpeReadView$fIpeReadLayerName$fIpeReadGroup$fIpeReadIpeObject$fIpeReadImage$fIpeReadMiniPage$fIpeReadTextLabel $fIpeReadPath$fIpeReadIpeSymbol$fIpeReadAttrAttr$fIpeReadTextPath$fIpeReadTextNonEmpty$fIpeReadText[]$fIpeReadTextIpeSize$fIpeReadTextIpePen$fIpeReadTextIpeColor$fIpeReadTextBox$fIpeReadTextIpeDash$fIpeReadTextIpeArrow$fIpeReadTextFillType $fIpeReadTextTransformationTypes$fIpeReadTextPinType$fIpeReadTextLayerName$fIpeReadTextMatrix$fIpeReadTextPoint$fIpeReadTextInt$fIpeReadTextTextIpeWriteipeWrite IpeWriteText ipeWriteText writeIpeFile writeIpePageprintAsIpeSelectiontoIpeSelectionXMLtoIpeXML writeIpeFile' ipeWriteAttrswriteAttrValuesaddAttsmAddAtts writeByShowunwords'unlines' ipeWriteRec fromPolyLinecombine $fIpeWrite()$fIpeWriteLineSegment$fIpeWritePolyLine$fIpeWriteIpeFile$fIpeWriteIpePreamble$fIpeWriteIpeStyle$fIpeWriteIpePage$fIpeWriteView$fIpeWriteLayerName$fIpeWriteIpeObject$fIpeWriteTextLabel$fIpeWriteText()$fIpeWriteImage$fIpeWriteMiniPage $fIpeWrite:+$fIpeWriteGroup$fIpeWritePath$fIpeWriteTextPathSegment$fIpeWriteTextPolygon$fIpeWriteTextPolyLine$fIpeWriteTextOperation$fIpeWriteTextMatrix$fIpeWriteIpeSymbol$fIpeWriteTextPath$fIpeWriteTextIpeArrow$fIpeWriteTextFillType$fIpeWriteTextIpeDash$fIpeWriteTextPinType!$fIpeWriteTextTransformationTypes$fIpeWriteTextIpeValue$fIpeWriteTextPoint$fIpeWriteTextRatio$fIpeWriteTextFixed$fIpeWriteTextInteger$fIpeWriteTextInt$fIpeWriteTextDouble$fIpeWriteTextText$fIpeWriteTextAttr$fIpeWriteTextLayerName$fIpeWriteTextIpeColor$fIpeWriteTextIpePen$fIpeWriteTextIpeSize ConvexPolygon_simplePolygon$fShowConvexPolygon$fEqConvexPolygon$fPointFunctorConvexPolygon simplePolygonextremesmaxInDirection leftTangent rightTangentmerge lowerTangent upperTangent isRightOfisLeftOf minkowskiSum bottomMost$fIsBoxableConvexPolygon$fIsTransformableConvexPolygonHasDefaultIpeOut DefaultIpeOut defaultIpeOutIpeOutasIpe asIpeObject asIpeObject'asIpeObjectWith asIpeGroup asIpeGroup' ipeObjectcoreOutipeMark ipeDiskMarknoAttrs addAttributesdefaultClipRectangleipeLineSegmentipeLineSegment' ipePolyLine ipePolyLine'ipeDisk ipeCircle ipeCircle'fromPathSegmentipeSimplePolygon$fHasDefaultIpeOutConvexPolygon$fHasDefaultIpeOutPolygon$fHasDefaultIpeOutPolyLine$fHasDefaultIpeOutBall$fHasDefaultIpeOutLineSegment$fHasDefaultIpeOutPoint$fFunctorIpeOutTriangle doubleArea inscribedDisk$fIsTransformableTriangle$fPointFunctorTriangle$fFunctorTriangle$fShowTriangle $fEqTriangle PlaneGraphwithEdgeDistancesfaceToSimplePolygon BinaryTreeNilInternalRoseElem InternalNodeLeafNodeSizedElem_unElemMeasuredmeasure BinLeafTreeLeafNodenodeasBalancedBinLeafTreefoldUp foldUpData zipExactWith toRoseTreedrawTreeaccessasBalancedBinTree foldBinaryUp toRoseTree' drawTree'$fNFDataBinaryTree $fMonoidSized$fSemigroupSized $fNFDataSized$fMeasuredSizeElem $fMonoidSize$fSemigroupSize$fSemigroupBinLeafTree$fTraversableBinLeafTree$fFoldable1BinLeafTree$fFoldableBinLeafTree$fMeasuredvBinLeafTree$fNFDataBinLeafTree$fShowBinLeafTree$fReadBinLeafTree$fEqBinLeafTree$fOrdBinLeafTree$fFunctorBinLeafTree$fGenericBinLeafTree $fShowSize $fReadSize$fEqSize $fNumSize$fIntegralSize $fEnumSize $fRealSize $fOrdSize $fGenericSize $fNFDataSize $fShowElem $fReadElem$fEqElem $fOrdElem $fFunctorElem$fFoldableElem$fTraversableElem $fShowSized $fEqSized $fOrdSized$fFunctorSized$fFoldableSized$fTraversableSized$fGenericSized$fShowRoseElem $fEqRoseElem$fFunctorRoseElem$fShowBinaryTree$fReadBinaryTree$fEqBinaryTree$fOrdBinaryTree$fFunctorBinaryTree$fFoldableBinaryTree$fTraversableBinaryTree$fGenericBinaryTreeBinaryTreeZipperLocCtxtopleftrightuptoRootvisitAllaccessZsubTrees splitTree $fShowCtx $fReadCtx$fEqCtx$fOrdCtx $fFunctorCtx $fFoldableCtx$fTraversableCtx$fShowBinaryTreeZipper$fReadBinaryTreeZipper$fEqBinaryTreeZipper$fOrdBinaryTreeZipper$fFunctorBinaryTreeZipper$fFoldableBinaryTreeZipper$fTraversableBinaryTreeZipperNodeData _splitPoint_intervalsLeft_intervalsRight$fShowNodeData $fEqNodeData $fOrdNodeData$fGenericNodeData$fNFDataNodeData IntervalTree_unIntervalTree intervalsLeftintervalsRight splitPoint$fShowIntervalTree$fEqIntervalTree$fGenericIntervalTree$fNFDataIntervalTree IntervalLiketoRangeunIntervalTree createTree fromIntervalstoListsearchstabinsertdelete$fIntervalLikeInterval$fIntervalLikeRangePointSetKDTreeEmptyTreeKDTree'KDTunKDTSplit'SplitCoordunCoordtoMaybe buildKDTree buildKDTree'ordNub toPointSet compareOnbuild reportSubTree searchKDTree searchKDTree'boxOf containedInsplitOn asSingleton $fEnumCoord $fShowCoord $fEqCoord $fEqKDTree $fShowKDTree $fEqKDTree' $fShowKDTree' $fEqSplit $fShowSplit_range_assoc$fFunctorNodeDataLeafData _atomicRange _leafAssocassocrange$fNFDataAtomicRange$fShowAtomicRange$fEqAtomicRange$fFunctorAtomicRange$fGenericAtomicRange$fShowLeafData $fEqLeafData$fFunctorLeafData$fGenericLeafData SegmentTree_unSegmentTree atomicRange leafAssoc$fNFDataLeafData$fShowSegmentTree$fEqSegmentTree$fGenericSegmentTree$fNFDataSegmentTreeCountgetCountI_unIAssoc insertAssoc deleteAssoc unSegmentTreefromIntervals' $fAssocCountC$fMeasuredCountC$fSemigroupCount$fIntervalLikeI $fAssoc[]I $fMeasured[]I$fShowBuildLeaf $fEqBuildLeaf$fShowI$fReadI$fEqI$fOrdI $fGenericI $fNFDataI $fShowCount $fEqCount $fOrdCount $fNumCount$fIntegralCount $fEnumCount $fRealCount$fGenericCount $fNFDataCount $fGenericC $fNFDataCTPairHeightColorRedBlackBalBSTnavtoTree TreeNavigatorNavgoLeft extractKeyordNavordNavBy fromList'nulllookupmemberminViewmaxViewjoinjoinWithcollect extractPrefix extractSuffixsplit splitExtractshowTree unsafeMin unsafeMaxtoList'blackredblackenbalancemkNode $fShowBalBST$fContravariantTreeNavigator $fShowColor $fReadColor $fEqColor $fOrdColor $fShowTree$fEqTree $fShowPair$fEqPair $fFunctorPair$fFoldablePair$fTraversablePair$fShowT$fEqT$fOrdT VertexData _location_vData$fShowVertexData$fEqVertexData$fOrdVertexData$fFunctorVertexData$fFoldableVertexData$fTraversableVertexDataEdgeData _edgeType_eDataEdgeTypeVisible InvisiblelocationvData$fBifunctorVertexData$fShowEdgeType$fReadEdgeType $fEqEdgeType $fOrdEdgeType$fShowEdgeData $fEqEdgeData $fOrdEdgeData$fFunctorEdgeData$fFoldableEdgeData$fTraversableEdgeDataFaceData_holes_fDataeDataedgeType$fShowFaceData $fEqFaceData $fOrdFaceData$fFunctorFaceData$fFoldableFaceData$fTraversableFaceDataPlanarSubdivision_graphfData$fShowPlanarSubdivision$fEqPlanarSubdivisiongraph fromPolygon fromVerticesfromConnectedSegmentsfromConnectedSegments'$fFunctorPlanarSubdivisionPersistentStatePersistentStateTstorerunPersistentStateTrunPersistentState$fMonadStatesPersistentStateT$fFunctorPersistentStateT$fApplicativePersistentStateT$fMonadPersistentStateTST uniquePairs nonEmptyTailsuniqueTriplets$fEqST$fOrdST$fShowSTAdjacencyListsdfsadjacencyListsdfs'mstmstEdgesmakeTree _splitDim_bBox _nodeDataWSP SplitTreeLevel_unLevel _widestDimPointSeqbBoxnodeDatasplitDim$fTraversableNodeData$fFoldableNodeData$fMeasuredvNodeData $fShowLevel $fEqLevel $fOrdLevelFindAndCompactFAC _leftPart _rightPart _shortSide ShortSideIdxunLevel widestDim nextLevel$fShowShortSide $fEqShortSide$fEqFindAndCompact$fShowFindAndCompactleftPart rightPart shortSideAlwaysTrueWSPDRST fairSplitTreewellSeparatedPairsfairSplitTree'distributePoints transposedistributePoints' reIndexPoints assignLevels compactEnds assignLevellevelOfhasLevel compactEnds'findAndCompactwidestDimensionwidthsextends findPairsareWellSeparatedboxBoxareWellSeparated'boxBox1maxWidthbbOf children'dropIdx DiskResult_enclosingDisk_definingPoints TwoOrThreeThree$fFoldableTwoOrThree$fShowTwoOrThree$fReadTwoOrThree$fEqTwoOrThree$fOrdTwoOrThree$fFunctorTwoOrThreedefiningPoints enclosingDisksmallestEnclosingDisksmallestEnclosingDisk'smallestEnclosingDiskWithPointsmallestEnclosingDiskWithPointsinitialpairstripletsdisk' enclosesAlldouglasPeuckermaxDistIntersectionPoint_intersectionPoint_associatedSegs Intersections Associated _endPointOf _interiorToSet' endPoints' associated endPointOf interiorTo$fMonoidAssociated$fSemigroupAssociated$fEqAssociated$fShowAssociated$fShowIntersectionPoint$fEqIntersectionPointassociatedSegsintersectionPoint intersections handlePointaddTo isEndPointOfStatusStructure EventQueueEvent eventPoint eventType EventTypeStartEnd groupStarts ordPoints startSegsordAtNavsweephandleextractContainstoStatusStruct rightEndpointendsAt findNewEvent $fOrdEvent$fOrdEventType $fEqEventType$fShowEventType $fShowEvent $fEqEvent diameterNaivediametralPairNaivediametralPairWithNaive Triangulation _vertexIds _positions _neighboursAdjVertexVertexID$fShowTriangulation$fEqTriangulationST'ArcIDMapping neighbours positions vertexIdsshowDTtriangulationEdgestEdgesdrawTriangulationtoPlanarSubdivision toPlaneGraphdelaunayTriangulation toAdjLists sortAround' extractEdges isDelaunay convexHull upperHull lowerHullFirstsMergedelaunayTriangulation'firstsfromHullmoveUprotateR'rotateL'qTest rotateToFirstinsert'lookup'size'pred'succ'focus'nub'withIDlookup''MSTW euclideanMST treeEdges$fSemigroupMergerandsGBottomGTop wrapUnsafeviewLSeqtestLtestL'ScalarMultipleMaybeallZeroscalarMultiple' Linear.VectorouterunitscaledbasisForbasis^/^**^sumVnegatedEelAdditivezero^+^^-^lerpliftU2liftI2cmpLowercmpUpper _unEndPoint clipLower' clipUpper'pManypNotFollowedBy<*><><***>***> ReversablereverseSrunP'runPpMany1pChoicepNaturalpIntegerpCharpSpace pWhiteSpacepMaybepCountpSepBy<*><<***$fReversableText$fReversable[]$parsec-3.1.11-37j7M1YEHqtEooY7BpJdriText.Parsec.TextParserText.Parsec.Error ParseError%singletons-2.2-4oTlR0gRjC8CzA35sb9tZwData.SingletonsSing unIntervalreorderEdgeData _embedding _vertexData _rawDartData _faceData unVertexIdTestG _unEdgeOracleTest rawDartData assignArcs testEdges withFocusresplit allRotations' GLineSegment _unLineSeg unLineSegsegment2SubLinesubLineToSegmentV_P&vector-0.12.0.0-4Id7FElSeAC3wKuJGC9cw4Data.Vector.Unboxed.BaseMVectorMV_Prelative_PointlensPPzipTraverseWithallTextreadAlltestSym readSymAttrs firstRighttestz validateAll validateAll'unTexttestP rightMostleftMost getVertices findMaxWith tangentCmp rotateTo'coreEqtest1test2testAtestBtest'' AtomicRange interleavegetRange Singleton_unC BuildLeaf LeafSingleton LeafRange inAtomicRange coversAtomictstclosedIntervalshowTtest'runPersistentStateT'UFfind'_unUFnewbaseGHC.BaseNothinghullhull'incXdecY rightTurnunMerge