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.

  1. _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
    

  2. sizeAdjustment :: (Additive v, Foldable v, OrderedField n) => SizeSpec v n -> BoundingBox v n -> (v n, Transformation v n)

    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.

  3. module Diagrams.TwoD.Adjust

    A default diagram-adjustment implementation for two-dimensional diagrams, useful for backend implementors.

  4. adjustDia2D :: (TypeableFloat n, Monoid' m) => Lens' (Options b V2 n) (SizeSpec V2 n) -> b -> Options b V2 n -> QDiagram b V2 n m -> (Options b V2 n, Transformation V2 n, QDiagram b V2 n m)

    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)
    It 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.

  5. adjustSize2D :: (TypeableFloat n, Monoid' m) => Lens' (Options b V2 n) (SizeSpec V2 n) -> b -> Options b V2 n -> QDiagram b V2 n m -> (Options b V2 n, Transformation V2 n, QDiagram b V2 n m)

    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.

  6. isJust :: Maybe a -> Bool

    Cabal-syntax Distribution.Compat.Prelude

    No documentation available.

  7. adjustPos :: (Position -> Position) -> Lex ()

    Cabal-syntax Distribution.Fields.LexerMonad

    No documentation available.

  8. xclaimJustIds :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> XClaimOpts -> [ByteString] -> m (f [ByteString])

    hedis Database.Redis

    No documentation available.

  9. xclaimJustIds :: RedisCtx m f => ByteString -> ByteString -> ByteString -> Integer -> XClaimOpts -> [ByteString] -> m (f [ByteString])

    hedis Database.Redis.Sentinel

    No documentation available.

  10. 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
    

Page 43 of many | Previous | Next