Hoogle Search
Within LTS Haskell 24.64 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
A default diagram-adjustment implementation for two-dimensional diagrams, useful for backend implementors.
-
diagrams-lib Diagrams.TwoD.Adjust adjustDia2D provides a useful default implementation of the adjustDia method from the Backend type class. As its first argument it requires a lens into the output size contained in the rendering options. It then performs the following adjustments:
- Set default attributes (see setDefault2DAttributes)
- Scale and translate the diagram to fit within the requested size (see adjustDiaSize2D)
-
diagrams-lib Diagrams.TwoD.Adjust Adjust the size and position of a 2D diagram to fit within the requested size. The first argument is a lens into the output size contained in the rendering options. Returns an updated options record, any transformation applied to the diagram (the inverse of which can be used, say, to translate output/device coordinates back into local diagram coordinates), and the modified diagram itself.
-
hedis Database.Redis No documentation available.
-
hedis Database.Redis.Sentinel No documentation available.
whenJust :: Applicative f => Maybe a -> (a -> f ()) -> f ()relude Relude.Monad.Maybe Specialized version of for_ for Maybe. It's used for code readability. Also helps to avoid space leaks: Foldable.mapM_ space leak.
>>> whenJust Nothing $ \b -> print (not b) >>> whenJust (Just True) $ \b -> print (not b) False
whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m ()relude Relude.Monad.Maybe Monadic version of whenJust.
>>> whenJustM (pure Nothing) $ \b -> print (not b) >>> whenJustM (pure $ Just True) $ \b -> print (not b) False
-
relude Relude.Monad.Reexport 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
fromJust :: HasCallStack => Maybe a -> arelude Relude.Unsafe The fromJust function extracts the element out of a Just and throws an error if its argument is Nothing.
Examples
Basic usage:>>> fromJust (Just 1) 1
>>> 2 * (fromJust (Just 10)) 20
>>> 2 * (fromJust Nothing) *** Exception: Maybe.fromJust: Nothing ...
WARNING: This function is partial. You can use case-matching instead.data
IsJust (b :: Maybe a) (c :: Bool)first-class-families Fcf No documentation available.