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.

  1. 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 = []})))
    

  2. allPairs :: [a] -> [(a, a)]

    wkt-types Data.WKT.Helpers

    No documentation available.

  3. allSides :: Triangle a -> [(Point a, Point a)]

    wkt-types Data.WKT.Triangle

    No documentation available.

  4. allSubTrees :: T branch leaf -> [T branch leaf]

    wraxml Data.Tree.BranchLeaf

    No documentation available.

  5. allSubTrees :: T i branch leaf -> [T i branch leaf]

    wraxml Data.Tree.BranchLeafLabel

    No documentation available.

  6. allSubTrees :: T i name str -> [T i name str]

    wraxml Text.XML.WraXML.Tree

    No documentation available.

  7. allocaXXH32State :: (XXH32State -> IO a) -> IO a

    xxhash-ffi Data.Digest.XXHash.FFI.C

    allocaXXH32State f temporarily allocates a XXH32State and passes it to the function f.

  8. allocaXXH3State :: (XXH3State -> IO a) -> IO a

    xxhash-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!

  9. allocaXXH64State :: (XXH64State -> IO a) -> IO a

    xxhash-ffi Data.Digest.XXHash.FFI.C

    allocaXXH64State f temporarily allocates a XXH64State and passes it to the function f.

  10. allPrecures :: PreCure p => Set p

    yes-precure5-command ACME.Yes.PreCure5.Class

    No documentation available.

Page 146 of many | Previous | Next