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.

  1. module Diagrams.TwoD.Adjust

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

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

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

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

    hedis Database.Redis

    No documentation available.

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

    hedis Database.Redis.Sentinel

    No documentation available.

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

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

  8. isJust :: Maybe a -> Bool

    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
    

  9. fromJust :: HasCallStack => Maybe a -> a

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

  10. data IsJust (b :: Maybe a) (c :: Bool)

    first-class-families Fcf

    No documentation available.

Page 34 of many | Previous | Next