z_      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^Safe'=_`_`_`Safe (234=JKDependently-typed sum. abcdefabcdebaf Trustworthy '(24=JKM Conversion of types to readable gs. Analogous to h. Convert a type a to a readable g. Analogous to i in h. Convert a type a to a readable g) with additional arguments. Analogous to j in h. klmnopqrstuvwxyz{|}~klmnopqrstuvwxyz{|}~Safe '6=HJKMInfix synonym for . When x has a type T, ( ::  key) x works as  x ::  key T. Using , you can avoid writing T.  used in BST. Give a new key to an . Make an  setting a key with proxy. Infix synonym for  .      Trustworthy'(=JK ,Compare two types. Users can add instances. Compare two types.  The smallest type (and kind) on  . The largest type (and kind) on  .    Trustworthy (246=JKMDependently-typed list. Infix synonym for . [ : Trustworthy&'(23468=HJKM<O(log n) . Delete the  at the maximum key from the E". The result may be unbalanced. O(log n). Get the value type of the  at the maximum key in the E. O(log n) . Delete the  at the minimum key from the E". The result may be unbalanced. O(log n). Get the value type of the  at the minimum key in the E. O(log n) . Split the D into (the value of) the " at the minimum key and the rest. O(log n) . Delete an  at key from the E). If the BST does not have any item at keyE, the original BST will be returned. The result may be unbalanced. O(log n) . Delete an  at key from the D. O(log n) . Insert  key a into the E. If t already has an  with key, the 6 will be overwritten. The result may be unbalanced. O(log n) . Insert a at key into the D". The result may be unbalanced. !O(n log n + n' log n') . Merge two Es. If t and t' has an Item& with the same key, only the one in t will be added to the result. "O(n log n + n' log n') . Merge two Es in a more equal manner. If t has  key a and t' has  key b,  key (a, b) will be added to the result. #O(n log n + n' log n') . Merge two Ds. $O(n log n + n' log n') . Merge two Ds in a more equal manner. & O(n log n') when f is D and O(log n + log n') when f is C.  Possibly unsafe conversion from f t to f t'. ( O(n log n) (no matter how unbalanced t is). Balance an unbalanced E. EDoing a lot of insertions and deletions may cause an unbalanced BST. If t and t'1 have the same items (just in different orders), Balance t == Balance t',  Moreover, if t and as1 have the same items (just in different orders), Balance t = Fromlist as. ) O(n log n) (no matter how unbalanced t is). Balance an unbalanced D. If rc and rc'1 have the same items (just in different orders), balance rc == balance rc',  Moreover, if rc and l1 have the same items (just in different orders), balance rc = fromlist l. *t is included by t'; in other words, t' contains all items in t. !IncludedBy t t' == Includes t' t +t includes t'; in other words, t contains all items in t'. -O(log n + log n'). Pattern matching on C t , where D t' contains functions that return res for some items in t. X with a looser context. /When f is either D or C, (SearchableF f t key == Searchable t key 0O(log n). N with a looser context. 1t may have an  with a key type key and a value type a. When 9 t key, a should be : t key, but when not, a can be any type. 2O(log n). Change the value type of an  at key from a to b. 3O(log n). J with a looser context and . 4O(log n). K with a looser context. 5O(log n). L with a looser context and . 8When f is either D or C, (AccessibleF f t key == Accessible t key 9t has an  with key. :O(log n). Find the type at key. ;O(n). Convert from a E to a type-level sorted list. =Build a D with empty s. ?O(n). Convert from a  to a C. A O(n log n)&. Convert from a type-level list to a E. If as has two or more Js that have the same key, only the first one will be added to the result. If as and bs1 have the same items (just in different orders), Fromlist as == Fromlist bs.  Example: Ltype T = Fromlist [0 |> Bool, 4 |> String, 2 |> Int, 3 |> Double, 1 |> Char]:kind! T T :: BST * = 'Node B ('Node 'Leaf (Item 0 Bool) ('Node 'Leaf (Item 1 Char) 'Leaf))  (Item 2 Int) F ('Node ('Node 'Leaf (Item 3 Double) 'Leaf) (Item 4 [Char]) 'Leaf) :kind! Tolist TTolist T :: [*] 9= '[Item 0 Bool, Item 1 Char, Item 2 Int, Item 3 Double,  Item 4 [Char]] B O(n log n). Convert from a  to a D. If rc and rc'1 have the same items (just in different orders), fromlist rc == fromlist rc'. Example (where T- is a type defined in the previous example): ^let rct = fromlist $ p3 |> 3 .:. p0 |> True .:. p2 |> 10 .:. p4 |> "wow" .:. p1 |> 'a' .:. Nilrct3<Record> [<0> True,<1> 'a',<2> 10,<3> 3,<4> "wow"] :type rctrct  :: (Num a1, Num a) => Record  ('Node H ('Node 'Leaf (Item 0 Bool) ('Node 'Leaf (Item 1 Char) 'Leaf))  (Item 2 a1) H ('Node ('Node 'Leaf (Item 3 a) 'Leaf) (Item 4 [Char]) 'Leaf)) :type rct :: Record Trct :: Record T :: Record T CDependently-typed union, or an  extensible% union. If you want to build a new C, use L or ?. D Dependently-typed record, or an  extensible& record. If you want to build a new D, use B. E8Type-level binary search tree used as an "ordered map". a! is supposed to be a proper type  key val of the kind * , where key& is a key type of an arbitrary kind val is a value type of the kind *. All s in a E should have different keys. $Type inference works very well with E$s, and value types can naturally be  polymorphic. If you want to build a new E, use A-, whose result is guaranteed to be balanced. HO(n). Convert from a D to a . IO(n). Convert from a C to a . JO(log n). Get the value at key in a D. A special version of 3$ with a tighter context and without . KO(log n). Get the value at key in a C. A special version of 4 with a tighter context. LO(log n)=. Injection to a dependently-typed union. One way to build a C. A special version of 5$ with a tighter context and without . Just (inj p x) == injX p x MInfix synonym for J. NO(log n). N3 stands for "super-map". Change the value of the  at key in f t by applying the function  At t key -> b. A special version of 0 with a tighter context. OO(log n). O3 stands for "super-update". A special version of T with a tighter context.  supdate p x == smap p (const x) PO(log n). A special version of N= that does not change the value type. A special version of U with a tighter context. QO(log n). A special version of O= that does not change the value type. A special version of V with a tighter context. !update p x == adjust p (const x) R&Infix operator that works almost like N. (p |> f) <$*> c = smap p f c SInfix synonym for 3. TO(log n). O with a looser context. UO(log n). P with a looser context. VO(log n). Q with a looser context. W&Infix operator that works almost like 0.  (p |> f) <$*?> c = smapX p f cz XO(log n + log n'). Pattern matching on C t , where D t' contains functions that return res for all items in t. A special version of - with a tighter context. Y O(n log n'). A special version of &C with a tighter context guaranteeing the safety of the conversion. ZO(log n + log n'). A special version of &C with a tighter context guaranteeing the safety of the conversion. [O(log n). Get the value of the  at the minimum key in the D. findmin = fst . splitmin \O(log n) . Delete the  at the minimum key from the D. deletemin = snd . splitmin ]O(log n). Get the value of the  at the maximum key in the D. findmin = fst . splitmin ^O(log n) . Delete the  at the maximum key from the D. deletemin = snd . splitmin  !"#$%&'()*+,-./0123456789:;<=>?    @ABCDEFG HIJKLMNOPQRSTUVWXYZ[\]^ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVP !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG HIJKLMNOPQRSTUVWXYZ[\]^ !#"$%&'()*+,-./0134526789:;<=>?    @ABCDEGFHIJKLMNOPQRSTUVWXYZ[\]^ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR STUVM RW(c) Yusuke Matsushita 2014 BSD3 Yusuke Matsushita  provisional  portable SafeKhab  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG HIJKLMNOPQRSTUVWXYZ[\]^_EGFDC@AB>?<=HI;9:JKLM8NOPQR7613452S/0TUVW.X,-+*YZ'()%& !#"$[\]^   W       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeffghijklmnompqmprmpstuvwxyz{|}~m      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`atype-level-bst-0.1Type.BSTType.BST.Proxy Type.BST.SumType.BST.Showtype Type.BST.ItemType.BST.Compare Type.BST.List Type.BST.BSTSumShowtypeshowtype showtypesPrec|>WithItemvaluenewkeyitem CompareUserCompare SmallestKSmallestLargestKLargestList.:.MaxableFindmaxsplitmaxMinnableFindminsplitmin DeletableDeletedelete InsertableInsertinsert MergeableMergeMergeEmergemergeEMetamorphosable metamorphose BalanceableBalancebalance IncludedByIncludes UnioncasableX unioncaseX Unioncasable SearchableFsmapX SearchableSmapatXprojXinjX ContainedByContains AccessibleF AccessibleAtTolistFoldablevirtual Fromsumablefromsum FromlistableFromlistfromlistUnionRecordBSTNodeLeaftolisttosumatprojinj!smapsupdateadjustupdate<$*>!?supdateXadjustXupdateX<$*?> unioncaseshrinkexpandfindmin deleteminfindmax deletemaxProxyTailHead $fShowSum $fShowSum0 TFCo:R:Sum: TFCo:R:Sum[]baseGHC.BaseStringGHC.ShowShowshow showsPrec Showlisttype showlisttype showtuple$fShowtype*(,,,,,,,,,)$fShowtype*(,,,,,,,,)$fShowtype*(,,,,,,,)$fShowtype*(,,,,,,)$fShowtype*(,,,,,)$fShowtype*(,,,,)$fShowtype*(,,,)$fShowtype*(,,)$fShowtype*(,)$fShowlisttypek:$fShowlisttypek[] $fShowtype[]:$fShowtype[][]$fShowtypeEitherRight$fShowtypeEitherLeft$fShowtypeMaybeJust$fShowtypeMaybeNothing$fShowtypeSymbols$fShowtypeNatn$fShowtypeOrderingGT$fShowtypeOrderingEQ$fShowtypeOrderingLT$fShowtypeBoolTrue$fShowtypeBoolFalse $fShowItem$$ TFCo:R:$$EQb TFCo:R:$$GTb TFCo:R:$$LTbConsMergepairsable Mergepairs mergepairs MergeallableMergeallmergeallAscendingable' Ascending' ascending' Ascendingable Ascending ascendingDescendingable' Descending' descending'Descendingable Descending descendingSequencesable' Sequences' sequences' Sequencesable Sequences sequencesSortableSortsort RevappableRevapprevapp MergeableL'MergeL'MergeEL'mergeL'mergeEL' MergeableLMergeLMergeELmergeLmergeELLengthListListShowlistshowlistNilNilConsConsNil.::.$fMergepairsable:$fMergepairsable:0$fMergepairsable[]$fMergeallable:$fMergeallable:0$fAscendingable'GTaasbs$fAscendingable'EQaas:$fAscendingable'LTaas:$fAscendingableaas:$fAscendingableaas[]$fDescendingable'GTaas:$fDescendingable'LTaasbs$fDescendingable'EQaas:$fDescendingableaas:$fDescendingableaas[]$fSequencesable'GT:$fSequencesable'LT:$fSequencesable'EQ:$fSequencesable:$fSequencesable:0$fSequencesable[] $fSortableas$fRevappable:bs$fRevappable[]bs$fMergeableL'GTas:$fMergeableL'LT:bs$fMergeableL'EQ::$fMergeableL::$fMergeableL:[]$fMergeableL[]bsTFCo:R:Length:TFCo:R:Length[]TFCo:R:ListList[]TFCo:R:ListList:$fShowlistList$fShowlistList0 $fShowList $fShowList0 TFCo:R:List: TFCo:R:List[] Deletemax Deletemin Data.MaybeMaybe Deletable'Delete'delete' Insertable'Insert'insert'MetamorphosableU metamorphoseUMetamorphosableR'metamorphoseR'MetamorphosableR metamorphoseR Searchable'Smap'atX'projX'injX'smapXR'smapXU'smapXRsmapXU Accessible'At'Tolist'tolist'tosum' Fromsumable'fromsum'Fromslistable'' Fromslist'' fromslist''Fromslistable' Fromslist' fromslist'FromslistableR FromslistR Fromslistable FromslistGoRGoLTopTripleNone fromslist fromslistR $fMaxableNode$fMaxableNode0$fMinnableNode$fMinnableNode0$fDeletable'kGTNodekey$fDeletable'kLTNodekey$fDeletable'kEQNodekey$fDeletable'kEQNodekey0$fDeletable'kEQNodekey1$fDeletablekNodekey$fDeletablekLeafkey$fInsertable'kGTNodekey$fInsertable'kLTNodekey$fInsertable'kEQNodekey$fInsertablekNodekey$fInsertablekLeafkey$fMergeablett'$fMetamorphosableUNodet$fMetamorphosableULeaft$fMetamorphosableR'Nodet$fMetamorphosableR'Leaft$fMetamorphosableRtt'$fMetamorphosableUniontt'$fMetamorphosableRecordtt'$fBalanceablet$fIncludedBytt'$fIncludestNode$fIncludestLeaf$fUnioncasableXNodet'res$fUnioncasableXLeaft'res$fUnioncasableNodet'res$fUnioncasableLeaft'res$fSearchableFkUniontkeya$fSearchableFkRecordtkeya$fSearchable'kGTNodekeya$fSearchable'kLTNodekeya$fSearchable'kEQNodekeya$fSearchablekNodekeya$fSearchablekLeaf_'_''$fContainedBykkeyat$fContainsktkeya$fAccessibleFkUniontkey$fAccessibleFkRecordtkey$fAccessible'kGTNodekey$fAccessible'kLTNodekey$fAccessible'kEQNodekey$fAccessiblekNodekey$fFoldableNode$fFoldableLeafTFCo:R:Tolistt$fFromsumable':t$fFromsumable'[]t$fFromsumableas$fFromslistable''Falsefwmn:bs$fFromslistable''TrueFalsemn:bs$fFromslistable''TrueTruemn:bs$fFromslistable'fwmn:bs$fFromslistable'fw01[]:$fFromslistable'fw00[][]$fFromlistableas $fShowUnion $fShowUnion0TFCo:R:UnionNodeTFCo:R:UnionLeaf $fShowRecordTFCo:R:RecordNodeTFCo:R:RecordLeaf