Hoogle Search
Within LTS Haskell 24.20 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
_Just :: forall a b p f . (Choice p, Applicative f) => p a (f b) -> p (Maybe a) (f (Maybe b))diagrams-lib Diagrams.Prelude This Prism provides a Traversal for tweaking the target of the value of Just in a Maybe.
>>> over _Just (+1) (Just 2) Just 3
Unlike traverse this is a Prism, and so you can use it to inject as well:>>> _Just # 5 Just 5
>>> 5^.re _Just Just 5
Interestingly,m ^? _Just ≡ m
>>> Just x ^? _Just Just x
>>> Nothing ^? _Just Nothing
-
diagrams-lib Diagrams.Size Get the adjustment to fit a BoundingBox in the given SizeSpec. The vector is the new size and the transformation to position the lower corner at the origin and scale to the size spec.
-
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.
-
Cabal-syntax Distribution.Compat.Prelude No documentation available.
adjustPos :: (Position -> Position) -> Lex ()Cabal-syntax Distribution.Fields.LexerMonad No documentation available.
-
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