h&J      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST Safe-Inferred89:B trie-simplebeginWith t xs returns new TSet t' which contains all string ys such that t contains xs ++ ys.  trie-simpleReturns number of elements. count$ takes O(number of nodes) unlike U which is O(1).  trie-simpleList of all elements. trie-simple epsilon = singleton []  trie-simpleConstruct a "parser" which recognizes member strings of a TSet.char2 constructs a parser which recognizes a character.eot recognizes the end of a token.! trie-simpleConstruct a "parser" which recognizes member strings of a TSet. It discards the information which string it is recognizing.char2 constructs a parser which recognizes a character.eot recognizes the end of a token.V trie-simpleMonoid(empty, union)W trie-simpleSemigroup(union)  trie-simplechar trie-simpleeot! trie-simplechar trie-simpleeot$  !"# Safe-Inferred  !  ! Safe-Inferred"#"# Safe-Inferred 89:d$ trie-simple Mapping from [c] to a implemented as a trie. This type serves the almost same purpose of  Map [c] a+, but can be looked up more efficiently.) trie-simple#Perform partial matching against a TMap. match xs tmap9 returns two values. The first value is the result of *. The second is another TMap for all keys which contain xs as their prefix. The keys of the returned map do not contain the common prefix xs.Example?let x = 'fromList' [("ham", 1), ("bacon", 2), ("hamburger", 3)] match "ham" x'(Just 1,fromList [("",1),("burger",3)])* trie-simplelookup xs tmap returns Just a if tmap contains mapping from xs to a, and returns Nothing if not.- trie-simpleTests if given map is empty.. trie-simpleReturns number of entries.Note that this operation takes O(number of nodes), unlike O(1) of X./ trie-simple0Returns list of key strings, in ascending order.0 trie-simple6Returns list of values, in ascending order by its key.1 trie-simpleEmpty TMap.2 trie-simpleTMap8 which contains only one entry from the empty string to a.3 trie-simplesingleton xs a is a TMap' which contains only one entry from xs to a.4 trie-simple'Inserts an entry of key and value pair.+Already existing value will be overwritten. insert = 'insertWith' (const a)5 trie-simple Deletes an entry with given key. !delete = 'update' (const Nothing)6 trie-simpleinsertWith op xs a tmap$ inserts an entry of key-value pair (cs,a) to the tmap. If tmap, already has an entry with key equals to xs , its value b is replaced with op a b. 1insertWith op cs a = 'revise' (maybe a (op a)) cs7 trie-simple/Deletes an entry with given key, conditionally.deleteWith f xs b looks up an entry with key xs*, and if such entry is found, evaluate f b a with its value a. If it returned Nothing5, the entry is deleted. Otherwise, if it returned Just a'-, the value of the entry is replaced with a'. %deleteWith f cs b = 'update' (f b) cs8 trie-simple-Apply a function to the entry with given key.9 trie-simpleApply a function f to the entry with the given key. If there is no such entry, insert an entry with value  f Nothing.: trie-simpleApply a function f! to the entry with given key. If f returns Nothing, that entry is deleted.; trie-simpleApply a function f, to the entry with given key. This function alter# is the most generic version of 8, 9, :.&You can insert new entry by returning Just a from  f Nothing.+You can delete existing entry by returning Nothing from  f (Just a).This function always evaluates  f Nothing in addition to determine operation applied to the given key. If you're not going to use alter! on missing keys, consider using update instead.B trie-simpleCreates a new TMap from two TMaps. The keys of the new map are concatenations of one key from the first map and another one from the second map.Corresponding values for these keys are calculated with the given function of type  (x -> y -> z). If two different concatenations yield the same key, the calculated values for these keys are combined with the Y operation <>.The behavior of  appendWith/ is equivalent to the following implementation. appendWith :: (Ord c, Semigroup z) => (x -> y -> z) -> TMap c x -> TMap c y -> TMap c z appendWith f x y = E= (flip (<>)) [ (kx ++ ky, f valx valy) | (kx, valx) <- F% x , (ky, valy) <- toAscList y ] In other words, a set of colliding key-valur pairs is combined in increasing order of the left key. For example, suppose x, y are TMap! with these key-value pairs, and "kx1 ++ ky3, kx2 ++ ky2, kx3 ++ ky1 are all equal to the same key kz. x = G [ (kx1, x1), (kx2, x2), (kx3, x3) ] -- kx1 < kx2 < kx3 y = fromAscList [ (ky1, y1), (ky2, y2), (ky3, y3) ] On these maps,  appendWith> combines the values for these colliding keys in the order of kx*. *? kz (appendWith f x y) == Just (f x1 y3 <> f x2 y2 <> f x3 y1) Example let x = fromList [("a", 1), ("aa", 2)] :: TMap Char Int y = fromList [("aa", 10), ("aaa", 20)] :: TMap Char Int appendWith (\a b -> show (a,b)) x y == fromList [ ("aaa", "(1,10)") , ("aaaa", "(1,20)" <> "(2,10)") , ("aaaaa", "(2,20)") ]P trie-simpleSame semantics to following defintion, but have more efficient implementation. traverseWithKey f = fmap fromAscList . traverse (\(cs,a) -> (,) cs <$> f cs a) . toAscListQ trie-simpleSame semantics to following defintion, but have more efficient implementation. mapWithKey f = fromAscList . map (\(cs,a) -> (cs, f cs a)) . toAscListR trie-simpleSame semantics to following defintion, but have more efficient implementation. 2foldMapWithKey f = foldMap (uncurry f) . toAscListS trie-simpleSame semantics to following defintion, but have more efficient implementation. 2foldrWithKey f z = foldr (uncurry f) z . toAscListZ trie-simple=-based[ trie-simple=-basedM trie-simplechar trie-simpleeotN trie-simplechar trie-simpleeotO trie-simplechar trie-simpleeot1$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST Safe-Inferred$%&'(T$%&'(T Safe-Inferred,$)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS,$)*+,-./0123647589:;<=>?@ABCDEFGHIJKLMNOPQRS       !"#$%&'())  *+   ,-./012345678!9 ":;<=>%&?@ABCDEFGHIEJGKLMNO(trie-simple-0.4.2-KykImnLvqdpGmYsjCvZU2o Data.Trie.SetData.Trie.Set.InternalData.Trie.Map.Internal Data.Trie.MapData.Trie.Set.HiddenData.Trie.Map.HiddenTSetgetNodeNodemember notMember beginWithnullcount enumeratefoldrfoldMapfoldl'emptyepsilon singletoninsertdeleteunion intersection differenceappendprefixessuffixesinfixestoList toAscListfromList fromAscListtoSetfromSettoParser toParser_foldTSetparaTSetTMapmatchlookupkeyselemsjust insertWith deleteWithadjustreviseupdatealter unionWithintersectionWithdifferenceWith appendWith fromListWithfromAscListWithtoMapfromMapkeysTSetfromTSet toParser__traverseWithKey mapWithKeyfoldMapWithKey foldrWithKeyfoldTMapcontainers-0.6.5.1Data.Set.Internalsize $fMonoidTSet$fSemigroupTSetData.Map.InternalbaseGHC.Base Semigroup $fMonoidTMap$fSemigroupTMap