Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. induceJust :: Ord a => Relation (Maybe a) -> Relation a

    algebraic-graphs Algebra.Graph.Relation

    Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Complexity: O(n + m) time.

    induceJust (vertex Nothing)                               == empty
    induceJust (edge (Just x) Nothing)                        == vertex x
    induceJust . gmap Just                                    == id
    induceJust . gmap (\x -> if p x then Just x else Nothing) == induce p
    

  2. induceJust :: Ord a => Relation (Maybe a) -> Relation a

    algebraic-graphs Algebra.Graph.Relation.Symmetric

    Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Complexity: O(n + m) time.

    induceJust (vertex Nothing)                               == empty
    induceJust (edge (Just x) Nothing)                        == vertex x
    induceJust . gmap Just                                    == id
    induceJust . gmap (\x -> if p x then Just x else Nothing) == induce p
    

  3. induceJust :: Graph (Maybe a) -> Graph a

    algebraic-graphs Algebra.Graph.Undirected

    Construct the induced subgraph of a given graph by removing the vertices that are Nothing. Complexity: O(s) time, memory and size.

    induceJust (vertex Nothing)                               == empty
    induceJust (edge (Just x) Nothing)                        == vertex x
    induceJust . fmap Just                                    == id
    induceJust . fmap (\x -> if p x then Just x else Nothing) == induce p
    

  4. endsJust :: (HasCallStack, Show a, Eq a) => IO (Maybe a) -> a -> Expectation

    benri-hspec Test.Hspec.Benri

    action `endsJust` expected sets the expectation that action returns Just expected.

    Example

    >>> pure (readMaybe "1" :: Maybe Int) `endsJust` 1
    

  5. endsJust_ :: Show a => IO (Maybe a) -> IO ()

    benri-hspec Test.Hspec.Benri

    endsJust_ action sets the expectation that action returns Just a.

    Example

    >>> endsJust_ $ pure (readMaybe "1" :: Maybe Int)
    

  6. isJust :: Maybe a -> Bool

    cabal-install-solver Distribution.Solver.Compat.Prelude

    The isJust function returns True iff its argument is of the form Just _.

    Examples

    Basic usage:
    >>> isJust (Just 3)
    True
    
    >>> isJust (Just ())
    True
    
    >>> isJust Nothing
    False
    
    Only the outer constructor is taken into consideration:
    >>> isJust (Just Nothing)
    True
    

  7. fromJustX :: (HasCallStack, NFDataX a) => Maybe a -> a

    clash-prelude Clash.XException

    Same as fromJust, but returns a bottom/undefined value that other Clash constructs are aware of.

  8. adjust :: (a -> a) -> Int -> [a] -> [a]

    fft Math.FFT.Base

    A generally useful list utility

  9. data IJust (a :: Maybe k) (b :: k)

    functor-products Data.Type.Functor.Product

    Witness an item in a type-level Maybe by proving the Maybe is Just.

  10. data SIJust (as :: Maybe k) (a :: k) (b :: IJust as a)

    functor-products Data.Type.Functor.Product

    Kind-indexed singleton for IJust.

Page 71 of many | Previous | Next