h*      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0.1.1.0 Safe-Inferred"#()-1htree % but specialised to a constant type, Some (HasIs k f) is isomorphic to f khtree  but specialised to htree a Dict witnesses some constraint htree transform a  in something of kind k ->  to be able to use it in  htree7a functor useful for proving a constraint for some typeimport Data.Functor.Identity Proves @Eq (Identity (5 :: Int))Proves (Identity 5) htree match on a  htreedestructing a htree destruct a       Safe-Inferred"#()-1ohtreeproduct of two classeshtree8 but inversed: holds if all constraints in the list holdhtreelike  but on the type levelhtree-the class that every type has an instance forhtree-for all elements of a list, a contraint holdshtree%like All but can be partially appliedhtree typelevel Orhtree runIdentity x"bla"#htree(map with a function that maps forall f a$htree>map with a constraint that holds for all elements of the listimport Data.Functor.Consthcmap @Show (Const . show . runIdentity) (42 `HCons` HSing "bla" :: HList Identity '[ Int, String ])1HCons (Const "42") (HCons (Const "\"bla\"") HNil)%htree$traverse a structure with a function&htreetraverse a structure such that a constraint holds; this is the workhorse of mapping and traversingimport Data.Functor.Consthctraverse @Show (Just . Const . show . runIdentity) (42 `HCons` HSing "bla" :: HList Identity '[ Int, String ])8Just (HCons (Const "42") (HCons (Const "\"bla\"") HNil))'htreefoldr for HLists.(htreewitnesses that for all HLists, we can always derive the All Top constraint)htreeconcats two heterogeneous lists "! $#%&'()"! "!$#%&'()5"5)5 Safe-Inferred"#()-1@.htreeprovides evidence that an element is in the tree by providing a path to the element2htree1a constraint holds for all elements in the forest3htreeconstraint synonym for AllTree4htree/a constraint holds for all elements in the tree5htree3a type family that flattens a forest down to a list6htree1a type family that flattens a tree down to a list7htreemap a functor over a TyForest8htreemap a functor over a TyTree9htree$A forest of heterogeneous rose trees:htree-a heterogeneous rose tree indexed by a TyTree<htreea forest of TyTrees=htreea type level rose-tree that is only intended to store something of a certain kind, e.g. Type?htree*a pattern synonym for the leaf of an HTree@htreemap a function over an HTreeAhtree.map a function with a constraint over an HTreeBhtree$traverse a structure with a functionChtreetraverse a structure such that a constraint holds; this is the workhorse of mapping and traversingDhtreemonoidally folds down a tree to a single value using a constraint on the element in the wrapping functor, this is similar to Ehtreemonoidally folds down a tree to a single value, this is similar to Fhtree9flatten a heterogeneous tree down to a heterogeneous listGhtreewitnesses that for any HTree the constraint AllTree Top always holdsHhtreewitnesses that for any HForest the constraint AllForest Top always holdsIhtree%replace an element at a certain path.=><:?;9@A87BCEDF65.01/I432GH=><:?;?9@A87BCEDF65.01/I432GH;4>4 Safe-Inferred"#()-1 Ohtree4Together with HasField' implements a DFS in the treeQhtreeThis is the helper class that creates evidence, it implements a DFS together with DecideShtreethe search strategy used in Q0, this is intended to be used only as a DataKindVhtreetypelevel predicate that tests whether the element is in any of the subtreesWhtreesimple typelevel predicate that tests whether some element is in a treeXhtree1a newtype that is labeled with some typelevel tag[htreea type syonym that allows for easy construction of TyTrees that have labeled nodes\htreea labeled HNode Leaf]htreea pattern that allows for direct construction and destruction of nodes with labels^htree*gets an element given a path into the tree_htree7searches a tree for an element and returns that element`htreesearches a tree for an element and returns that element, specialised to X and unwrapsimport Data.Functor.Identitytype T = TyNodeL "top" Int [ TyNodeL "inter" Int '[ TyNodeL "foo" Int '[]], TyNodeL "foo" Int '[]]t :: HTree Identity T = 42 `HNodeL` HNodeL 4 (HNodeL 69 HNil `HCons` HNil) `HCons` HNodeL 67 HNil `HCons` HNil!getElem @'DFS @"foo" @Int Proxy t Identity 69!getElem @'BFS @"foo" @Int Proxy t Identity 67XYZ]\[`_SUTQROPWV^XYZ]\[`_SUTQROPWV^[4]4 Safe-Inferred"#()-1B qhtree,HList but the type level list is existentialrhtree,HTree but the type level tree is existentialshtreea Some type that take an arity two type constructor, this is necessary so that we avoid using composition on the type level or having visible parameters to the type synonymsuhtreea Some type that takes an arity one type constructor, this is for completenesswhtreetake some existentai arity one type constructor and a function that takes the non-existential one and returns some r and return an rxhtreetake some existential arity two type constructor and a function that takes the non-existential one and returns some r and return an ryhtreex specialized to :szhtreex specialized to s{htreefold over existential hlists|htreefold over existential htrees}htree destruct u , destruct  ~htree condens the   constraints in an existentialhtree&flip the constraints in an existentialuvstrqwxyz{| }~uvstrqwxyz{| }~ Safe-Inferred"#()-1" "!:;?]=>[@ABCEDF65XYZ` % "!"!:;??]=>[@ABCEDF65XYZ`       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK/012LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~   htree-0.1.1.0-inplaceData.HTree.Labeled Data.HTreeData.HTree.ConstraintData.HTree.FamiliesData.HTree.ListData.HTree.TreeData.HTree.Existentialhtreebase GHC.RecordsgetFieldHasFieldghc-prim GHC.TypesType Constraint Data.ProxyProxyHasIs HasTypeableDictChargeHasProveswithDictproves $fChargekca $fShowHasBothAllInvNotTopAllAllC||++ $fAllCkcxs$fTopkk $fAllInvk:k $fAllInvk[]k $fBothkc1c2aHListHConsHNilHSing:::hmaphcmap htraverse hctraversehcFold allTopHListhconcat $fEqHList $fEqHList0 $fShowHList $fShowHList0PathHereDeeperFarther AllForestAllTreeCAllTree FlattenForest FlattenTree ForestMapTreeMapHForestHTreeHNodeTyForestTyTreeTyNodeHLeaf hcFoldMaphFoldMaphFlatten allTopHTree allTopHForest replaceAt$fAllTreeCkcts$fEqPath $fShowPath $fEqHTree $fShowHTreeDecide evidence' HasField'evidenceSearchStrategyDFSBFSAnyElemElemLabeled MkLabeledunLabelTyNodeLHLeafLHNodeLgetElemWithPathgetElem'getElem$fHasField'BFStypTyNode$fHasField'DFStypTyNode$fHasField'BFStypTyNode0$fHasField'DFStypTyNode0$fHasFieldklHTreef$fDecidestratTruetypTyNode$fDecidestratFalsetypTyNode$fHasField'DFStypTyNode1$fHasField'BFStypTyNode1 $fShowLabeled $fEqLabeled $fOrdLabeled$fFunctorLabeled$fFoldableLabeled$fTraversableLabeled$fGenericLabeledEListETreeSome2MkSome2SomeMkSomewithwith2 withSomeHTree withSomeHList hcFoldEHListhcFoldMapEHTree withProvesprodHasflipHas $fOrdSome$fEqSome $fShowSome $fEqSome2 $fEqSome20 $fEqSome21 $fShowSome0 $fShowSome2Data.Typeable.InternalTypeable GHC.Classesnot Data.FoldablefoldMap