Hoogle Search
Within LTS Haskell 24.32 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
allPathsTree :: forall v i . Ord i => G v i -> i -> i -> Maybe (Tree i)topograph Topograph Like allPaths but return a Tree. All paths from a to b. Note that every path has at least 2 elements, start and end, Unfortunately, this is the same as dfs g <$> gToVertex 'a', as in our example graph, all paths from 'a' end up in 'e'.
>>> let t = runG example $ \g@G{..} -> fmap3 gFromVertex $ allPathsTree g <$> gToVertex 'a' <*> gToVertex 'e' >>> fmap3 (foldTree $ \a bs -> if null bs then [[a]] else concatMap (map (a:)) bs) t Right (Just (Just ["axde","axe","abde","ade","ae"]))>>> fmap3 (Set.fromList . treePairs) t Right (Just (Just (fromList [('a','b'),('a','d'),('a','e'),('a','x'),('b','d'),('d','e'),('x','d'),('x','e')])))>>> let ls = runG example $ \g@G{..} -> fmap3 gFromVertex $ allPaths g <$> gToVertex 'a' <*> gToVertex 'e' >>> fmap2 (Set.fromList . concatMap pairs) ls Right (Just (fromList [('a','b'),('a','d'),('a','e'),('a','x'),('b','d'),('d','e'),('x','d'),('x','e')]))Tree paths show how one can explore the paths.>>> traverse3_ dispTree t 'a' 'x' 'd' 'e' 'e' 'b' 'd' 'e' 'd' 'e' 'e'
>>> traverse3_ (putStrLn . T.drawTree . fmap show) t 'a' | +- 'x' | | | +- 'd' | | | | | `- 'e' | | | `- 'e' ...
There are no paths from element to itself, but we'll return a single root node, as Tree cannot be empty.>>> runG example $ \g@G{..} -> fmap3 gFromVertex $ allPathsTree g <$> gToVertex 'a' <*> gToVertex 'a' Right (Just (Just (Node {rootLabel = 'a', subForest = []})))-
wkt-types Data.WKT.Helpers No documentation available.
allSides :: Triangle a -> [(Point a, Point a)]wkt-types Data.WKT.Triangle No documentation available.
allSubTrees :: T branch leaf -> [T branch leaf]wraxml Data.Tree.BranchLeaf No documentation available.
allSubTrees :: T i branch leaf -> [T i branch leaf]wraxml Data.Tree.BranchLeafLabel No documentation available.
allSubTrees :: T i name str -> [T i name str]wraxml Text.XML.WraXML.Tree No documentation available.
allocaXXH32State :: (XXH32State -> IO a) -> IO axxhash-ffi Data.Digest.XXHash.FFI.C allocaXXH32State f temporarily allocates a XXH32State and passes it to the function f.
allocaXXH3State :: (XXH3State -> IO a) -> IO axxhash-ffi Data.Digest.XXHash.FFI.C allocaXXH3State f temporarily allocates a XXH3State and passes it to the function f. 64-bytes (yes, bytes not bits) alignment requirement is mandated by xxhash!
allocaXXH64State :: (XXH64State -> IO a) -> IO axxhash-ffi Data.Digest.XXHash.FFI.C allocaXXH64State f temporarily allocates a XXH64State and passes it to the function f.
allPrecures :: PreCure p => Set pyes-precure5-command ACME.Yes.PreCure5.Class No documentation available.