úÎ4å2Õ      %Policy type for a  Policy type for a . The 9 class defines an order on the elements contained within  a .  Compare two elements, just like   of the ! class, 9 so this function has to define a mathematical ordering.  When using a  for a , the minimal value % (defined by this order) will be the   of the . Must not be used. #Must be compared to 3rd parameter. #Must be compared to 2nd parameter. Result of the comparison. A ; with inverted order: The maximum will be extracted first. A . which will always extract the minimum first.  The basic  type. "#O(1) . Is the  empty? O(1) . Is the  empty? $O(1). Calculate the rank of a . %'Gets the default policy instance for a  that can be the first  parameter of . This function always returns &. O(n) . The number of elements in the . O(1)&. Finds the minimum (depending on the  ) of the . O(1). Constructs an empty . O(1). Create a singleton . O(log n). Insert an element in the . O(log n)'. Delete the minimum (depending on the )  from the . O(log n)%. Find the minimum (depending on the ) and  delete it from the . Take the lowest n$ elements in ascending order of the   (according to the ). $Remove the lowest (according to the ) n elements  from the .  n h) returns an ascending list of the lowest n  elements of h (according to its ) and a   like h, lacking those elements.  p h3 lists the longest prefix of elements in ascending  order (according to its ) of h that satisfy p.  p h5 returns the longest prefix of elements in ascending  order (according to its ) of h that satisfy p and  a  like h, lacking those elements.  p h5 returns the longest prefix of elements in ascending  order (according to its ) of h that do not satisfy p  and a  like h, lacking those elements. O(log max(n, m)). The union of two s. 'Combines a value x and two Heaps to one  . Therefore, x has to / be less or equal the minima (depending on the  ) of both   parameters. The precondition is not checked.  Builds the union over all given s. "Removes all elements from a given  that do not fulfil the  predicate. Partition the  into two.  p h = (h1, h2):  All elements in h1 fulfil the predicate p , those in h2 don't.   h1 h2 = h.  Builds a  from the given elements.  You may want to use , if you have a sorted list. O(n). Lists elements of the  in no specific order. O(n). Lists elements of the  in no specific order. O(n) . Creates a , from an ascending list. Note that the list * has to be ascending corresponding to the  , not to its  !) instance declaration (if there is one).  The precondition is not checked. O(n). Lists elements of the # in ascending order (corresponding  to the ). BSanity checks for debugging. This includes checking the ranks and M the heap and leftist (the left rank is at least the right rank) properties.      (      !"#$"#%&'()"*+,-heap-0.2 Data.Heap MaxPolicy MinPolicy HeapPolicy heapCompareMaxHeapMinHeapHeapnullisEmptysizeheadempty singletoninserttail extractHeadtakedropsplitAt takeWhilespanbreakunionunionsfilter partitionfromListtoListelems fromAscList toAscListcheckbase GHC.ClassescompareOrdTreeEmptyrankpolicyGHC.Err undefinedmakeT