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.
induceJust :: Ord a => Relation (Maybe a) -> Relation aalgebraic-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
induceJust :: Ord a => Relation (Maybe a) -> Relation aalgebraic-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
induceJust :: Graph (Maybe a) -> Graph aalgebraic-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
endsJust :: (HasCallStack, Show a, Eq a) => IO (Maybe a) -> a -> Expectationbenri-hspec Test.Hspec.Benri action `endsJust` expected sets the expectation that action returns Just expected.
Example
>>> pure (readMaybe "1" :: Maybe Int) `endsJust` 1
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)
-
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
fromJustX :: (HasCallStack, NFDataX a) => Maybe a -> aclash-prelude Clash.XException Same as fromJust, but returns a bottom/undefined value that other Clash constructs are aware of.
adjust :: (a -> a) -> Int -> [a] -> [a]fft Math.FFT.Base A generally useful list utility
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.
data
SIJust (as :: Maybe k) (a :: k) (b :: IJust as a)functor-products Data.Type.Functor.Product Kind-indexed singleton for IJust.