śĪ!¶¬­XŸ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžSafeJP discriminationOptimized and CPS'd version of 5, where all lefts are known to come before all rights(c) Edward Kmett 2015 BSD-styleEdward Kmett <ekmett@gmail.com> non-portableNone 2FHV9Ædiscrimination=Mutable boxed arrays associated with a primitive state token.discrimination Boxed arrays discriminationcCreate a new mutable array of the specified size and initialise all elements with the given value. discrimination/Read a value from the array at the given index. discrimination.Write a value to the array at the given index. discrimination9Read a value from the immutable array at the given index.discrimination’ Monadically read a value from the immutable array at the given index. This allows us to be strict in the array while remaining lazy in the read element which is very useful for collective operations. Suppose we want to copy an array. We could do something like this: copy marr arr ... = do ... writeSmallArray marr i (indexSmallArray arr i) ... ...2But since primitive arrays are lazy, the calls to  ! will not be evaluated. Rather, marrG will be filled with thunks each of which would retain a reference to arr&. This is definitely not what we want!With , we can instead write ˜copy marr arr ... = do ... x <- indexSmallArrayM arr i writeSmallArray marr i x ...\Now, indexing is executed immediately although the returned element is still not evaluated.discriminationtConvert a mutable array to an immutable one without copying. The array should not be modified after the conversion.discrimination{Convert an immutable array to an mutable one without copying. The immutable array should not be used after the conversion.discrimination<Check whether the two arrays refer to the same memory block.discrimination6Copy a slice of an immutable array to a mutable array.discriminationVCopy a slice of a mutable array to another array. The two arrays may not be the same.discriminationŹReturn a newly allocated SmallArray with the specified subrange of the provided SmallArray. The provided SmallArray should contain the full subrange specified by the two Ints, but this is not checked.discriminationąReturn a newly allocated SmallMutableArray. with the specified subrange of the provided SmallMutableArray. The provided SmallMutableArray should contain the full subrange specified by the two Ints, but this is not checked.discriminationdestination arraydiscriminationoffset into destination arraydiscrimination source arraydiscriminationoffset into source arraydiscriminationnumber of elements to copydiscriminationdestination arraydiscriminationoffset into destination arraydiscrimination source arraydiscriminationoffset into source arraydiscriminationnumber of elements to copydiscrimination source arraydiscriminationoffset into destination arraydiscriminationnumber of elements to copydiscrimination source arraydiscriminationoffset into destination arraydiscriminationnumber of elements to copy   (c) Edward Kmett 2015 BSD-styleEdward Kmett <ekmett@gmail.com> non-portable Trustworthy456FHSVX`<æ#discriminationBuild a singleton WordMap !"#$%#% !"$ Trustworthy&'28>FIJPSUVX_hNĀ -discriminationŸ; equipped with a compatible stable unordered discriminator..discriminationFor every surjection f,   f . "a . /discrimination)Productive Stable Unordered Discriminator2discriminationlThis may be useful for pragmatically accelerating a grouping structure by preclassifying by a hash function Semantically, grouping = hashing <> grouping 4discriminationValid definition for (”) in terms of -.6discriminationO(n) . Similar to  2, except we do not require groups to be clustered.QThis combinator still operates in linear time, at the expense of storing history.#The result equivalence classes are not$ sorted, but the grouping is stable. 6 = 7 ¢ 7discriminationO(n). This is a replacement for   using discrimination.#The result equivalence classes are not$ sorted, but the grouping is stable.8discriminationO(n). This upgrades   from  Data.List from O(n^2) to O(n)/ by using productive unordered discrimination. 8 = 9 ¢ 8 as = £  6 as 9discriminationO(n) . Online 8 with a Schwartzian transform. 9 f as = £  7 f as +,-./0123456789/01-.+,89674523Safe28>FIPSUVX_…Åbdiscrimination¤: equipped with a compatible stable, ordered discriminator.cdiscrimination0For every strictly monotone-increasing function f:   f c "a c ddiscriminationStable Ordered DiscriminatorgdiscriminationValid definition for „ in terms of b.idiscrimination~Construct a stable ordered discriminator that sorts a list as multisets of elements from another stable ordered discriminator.˜The resulting discriminator only cares about the set of keys and their multiplicity, and is sorted as if we'd sorted each key in turn before comparing.jdiscriminationyConstruct a stable ordered discriminator that sorts a list as sets of elements from another stable ordered discriminator.The resulting discriminator only cares about the set of keys, and is sorted as if we'd sorted each key in turn before comparing.ldiscrimination O(n)#. Sort a list using discrimination. l = m ¢ mdiscriminationO(n)H. Sort a list with a Schwartzian transformation by using discrimination.!This linear time replacement for   and   uses discrimination.ndiscriminationO(n). Construct a ¦.,This is an asymptotically faster version of (, which exploits ordered discrimination.toMap [] == emptyTrue)toMap [(5,"a"), (3 :: Int,"b"), (5, "c")]fromList [(5,"c"), (3,"b")])toMap [(5,"c"), (3,"b"), (5 :: Int, "a")]fromList [(5,"a"), (3,"b")]odiscriminationO(n). Construct a ¦, combining values.,This is an asymptotically faster version of (, which exploits ordered discrimination.B(Note: values combine in anti-stable order for compatibility with )CtoMapWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5 :: Int,"c")] fromList [(3, "ab"), (5, "cba")]toMapWith (++) [] == emptyTruepdiscriminationO(n). Construct a ¦*, combining values with access to the key.,This is an asymptotically faster version of (, which exploits ordered discrimination.F(Note: the values combine in anti-stable order for compatibility with )Plet f key new_value old_value = show key ++ ":" ++ new_value ++ "|" ++ old_valueCtoMapWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5 :: Int,"c")])fromList [(3, "3:a|b"), (5, "5:c|5:b|a")]toMapWithKey f [] == emptyTrueqdiscriminationO(n). Construct an §.toIntMap [] == emptyTrue%toIntMap [(5,"a"), (3,"b"), (5, "c")]fromList [(5,"c"), (3,"b")]%toIntMap [(5,"c"), (3,"b"), (5, "a")]fromList [(5,"a"), (3,"b")]rdiscriminationO(n). Construct an §, combining values.,This is an asymptotically faster version of (, which exploits ordered discrimination.B(Note: values combine in anti-stable order for compatibility with )?toIntMapWith (++) [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")] fromList [(3, "ab"), (5, "cba")]toIntMapWith (++) [] == emptyTruesdiscriminationO(n). Construct a ¦*, combining values with access to the key.,This is an asymptotically faster version of (, which exploits ordered discrimination.F(Note: the values combine in anti-stable order for compatibility with )Plet f key new_value old_value = show key ++ ":" ++ new_value ++ "|" ++ old_value?toIntMapWithKey f [(5,"a"), (5,"b"), (3,"b"), (3,"a"), (5,"c")])fromList [(3, "3:a|b"), (5, "5:c|5:b|a")]toIntMapWithKey f [] == emptyTruetdiscriminationO(n). Construct a Ø in linear time.,This is an asymptotically faster version of (, which exploits ordered discrimination.udiscriminationO(n). Construct an © in linear time.,This is an asymptotically faster version of (, which exploits ordered discrimination.`abcdefghijklmnopqrstudefbc`almkgnopqrstuhijSafe«ž˜discriminationO(n)^. Perform a full outer join while explicit merging of the two result tables a table at a time.-The results are grouped by the discriminator.™discriminationO(n)C. Perform an inner join, with operations defined one row at a time.-The results are grouped by the discriminator.CThis takes operation time linear in both the input and result sets.šdiscriminationO(n)F. Perform a full outer join with operations defined one row at a time.-The results are grouped by the discriminator.CThis takes operation time linear in both the input and result sets.›discriminationO(n)F. Perform a left outer join with operations defined one row at a time.-The results are grouped by the discriminator.CThis takes operation time linear in both the input and result sets.œdiscriminationO(n)G. Perform a right outer join with operations defined one row at a time.-The results are grouped by the discriminator.CThis takes operation time linear in both the input and result sets.˜discriminationthe discriminator to usediscriminationhow to join two tablesdiscriminationselector for the left tablediscriminationselector for the right tablediscrimination left tablediscrimination right table™discriminationthe discriminator to usediscriminationhow to join two rowsdiscriminationselector for the left tablediscriminationselector for the right tablediscrimination left tablediscrimination right tablešdiscriminationthe discriminator to usediscriminationhow to join two rowsdiscrimination-row present on the left, missing on the rightdiscrimination-row present on the right, missing on the leftdiscriminationselector for the left tablediscriminationselector for the right tablediscrimination left tablediscrimination right table›discriminationthe discriminator to usediscriminationhow to join two rowsdiscrimination-row present on the left, missing on the rightdiscriminationselector for the left tablediscriminationselector for the right tablediscrimination left tablediscrimination right tableœdiscriminationthe discriminator to usediscriminationhow to join two rowsdiscrimination-row present on the right, missing on the leftdiscriminationselector for the left tablediscriminationselector for the right tablediscrimination left tablediscrimination right table–—˜™š›œ–—˜™š›œSafe¬ )+,-./01456789`abcdefgijklmnopqrstu–—˜™š›œ)–—/01-.+,896754defbc`aklmijgnopqrstu˜™š›œŖ  !!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFFGHIJK   LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®ư±²³“µ°±¶³·ø³¹ŗ°±»°±¼½¾æ½ĄĮ½ĀýÄÅĘdiscrimination-0.4-inplaceData.Discrimination.Internal'Data.Discrimination.Internal.SmallArray$Data.Discrimination.Internal.WordMapData.Discrimination.GroupingData.Discrimination.SortingData.Discrimination.Class Data.EitherpartitionEithers Data.ListgroupGHC.Exts groupWithnubControl.Applicative<$>sortWithsortOnData.MapfromList fromListWithfromListWithKeyData.IntMap.LazyData.Set Data.IntSetData.DiscriminationbdiscNatrunsgroupNum updateBag updateSet spanEitherSmallMutableArray SmallArray newSmallArrayreadSmallArraywriteSmallArrayindexSmallArrayindexSmallArrayMunsafeFreezeSmallArrayunsafeThawSmallArraysameSmallMutableArraycopySmallArraycopySmallMutableArraycloneSmallArraycloneSmallMutableArray$fNFDataSmallArray$fEqSmallArray$fOrdSmallArray$fReadSmallArray$fShowSmallArray$fTraversableSmallArray$fFoldableSmallArray$fFunctorSmallArray$fIsListSmallArrayWordMapinsertlookupmember singletonempty$fTraversableWordMap$fFoldableWordMap$fFunctorWordMap$fNFDataWordMap $fShowWordMap Grouping1 grouping1GroupinggroupingGroupgetGrouphashingword8s groupingEqrunGroupnubWith $fMonoidGroup$fSemigroupGroup$fDecidableGroup$fDivisibleGroup$fContravariantGroup$fGroupingRatio$fGroupingNatural$fGroupingInteger$fGroupingComplex$fGroupingEither$fGroupingMaybe $fGrouping[]$fGrouping(,,,)$fGrouping(,,) $fGrouping(,)$fGroupingBool$fGroupingChar $fGroupingInt$fGroupingInt64$fGroupingInt32$fGroupingInt16$fGroupingInt8$fGroupingWord$fGroupingWord64$fGroupingWord32$fGroupingWord16$fGroupingWord8 $fGrouping()$fGroupingVoid$fGrouping1Complex$fGrouping1Compose$fGrouping1(,,,)$fGrouping1(,,)$fGrouping1(,)$fGrouping1Either$fGrouping1Maybe $fGrouping1[]$fGroupingComposeSorting1sorting1SortingsortingSortrunSortsortingCompare sortingNat sortingBag sortingSetdescsorttoMap toMapWith toMapWithKeytoIntMap toIntMapWithtoIntMapWithKeytoSettoIntSet $fMonoidSort$fSemigroupSort$fDecidableSort$fDivisibleSort$fContravariantSort$fSorting(,,,) $fSorting(,,) $fSorting(,)$fSortingEither$fSortingMaybe $fSorting[] $fSortingBool $fSortingVoid $fSortingChar $fSortingInt$fSortingInt64$fSortingInt32$fSortingInt16 $fSortingInt8 $fSortingWord$fSortingWord64$fSortingWord32$fSortingWord16$fSortingWord8$fSortingNatural$fSortingInteger $fSorting()$fSorting1Either$fSorting1Maybe $fSorting1[]$fSorting1Compose$fSortingComposeDiscriminatingdiscjoininginnerouter leftOuter rightOuter$fDiscriminatingGroup$fDiscriminatingSortghc-prim GHC.ClassesEqbaseData.Functor.Contravariant contramap==GHC.BaseidGHC.ListheadOrdcomparecontainers-0.6.0.1Data.Map.InternalMapData.IntMap.InternalIntMapData.Set.InternalSetData.IntSet.InternalIntSet