Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. justZ :: MonadPlus m => Maybe a -> m a

    errors Control.Error.Safe

    A fromJust that fails using mzero

  2. justifyLeft :: Word -> Char -> Buffer % 1 -> Buffer

    text-builder-linear Data.Text.Builder.Linear.Buffer

    Pad a builder from the right side to the specified length with the specified character.

    >>> :set -XLinearTypes
    
    >>> runBuffer (\b -> justifyLeft 10 'x' (appendChars 3 'A' b))
    "AAAxxxxxxx"
    
    >>> runBuffer (\b -> justifyLeft 5 'x' (appendChars 6 'A' b))
    "AAAAAA"
    
    Note that newEmptyBuffer is needed in some situations. See justifyRight for an example.

  3. justifyRight :: Word -> Char -> Buffer % 1 -> Buffer

    text-builder-linear Data.Text.Builder.Linear.Buffer

    Pad a builder from the left side to the specified length with the specified character.

    >>> :set -XLinearTypes
    
    >>> runBuffer (\b -> justifyRight 10 'x' (appendChars 3 'A' b))
    "xxxxxxxAAA"
    
    >>> runBuffer (\b -> justifyRight 5 'x' (appendChars 6 'A' b))
    "AAAAAA"
    
    Note that newEmptyBuffer is needed in some situations. The following example creates a utility function that justify a text and then append it to a buffer.
    >>> :set -XOverloadedStrings -XLinearTypes -XUnboxedTuples
    
    >>> import Data.Text.Builder.Linear.Buffer
    
    >>> import Data.Text (Text)
    
    >>> :{
    appendJustified :: Buffer %1 -> Text -> Buffer
    appendJustified b t = case newEmptyBuffer b of
    -- Note that we need to create a new buffer from the text, in order
    -- to justify only the text and not the input buffer.
    (# b', empty #) -> b' >< justifyRight 12 ' ' (empty |> t)
    :}
    
    >>> runBuffer (\b -> (b |> "Test:") `appendJustified` "AAA" `appendJustified` "BBBBBBB")
    "Test:         AAA     BBBBBBB"
    

  4. justonic :: T

    midi Sound.MIDI.Manufacturer

    No documentation available.

  5. justifyLeft :: Int -> Char -> JSString -> JSString

    jsaddle Data.JSString

    O(n) Left-justify a string to the given length, using the specified fill character on the right. Subject to fusion. Performs replacement on invalid scalar values. Examples:

    justifyLeft 7 'x' "foo"    == "fooxxxx"
    justifyLeft 3 'x' "foobar" == "foobar"
    

  6. justifyRight :: Int -> Char -> JSString -> JSString

    jsaddle Data.JSString

    O(n) Right-justify a string to the given length, using the specified fill character on the left. Performs replacement on invalid scalar values. Examples:

    justifyRight 7 'x' "bar"    == "xxxxbar"
    justifyRight 3 'x' "foobar" == "foobar"
    

  7. justifyLeftI :: Integral a => a -> Char -> Stream Char -> Stream Char

    jsaddle Data.JSString.Internal.Fusion.Common

    No documentation available.

  8. just_ :: forall a b f . Applicative f => LensLike f (Maybe a) (Maybe b) a b

    lens-family Lens.Family2.Stock

    Traversal on the Just element of a Maybe.

  9. just' :: SqlExpr (Value typ) -> SqlExpr (Value (Maybe typ))

    esqueleto Database.Esqueleto

    Like just, but this function does not try to collapse nested Maybe. This may be useful if you have type inference problems with just.

  10. justList :: SqlExpr (ValueList typ) -> SqlExpr (ValueList (Maybe typ))

    esqueleto Database.Esqueleto

    Same as just but for ValueList. Most of the time you won't need it, though, because you can use just from inside subList_select or Just from inside valList.

Page 19 of many | Previous | Next