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.
justZ :: MonadPlus m => Maybe a -> m aerrors Control.Error.Safe A fromJust that fails using mzero
justifyLeft :: Word -> Char -> Buffer % 1 -> Buffertext-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.justifyRight :: Word -> Char -> Buffer % 1 -> Buffertext-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"
-
midi Sound.MIDI.Manufacturer No documentation available.
justifyLeft :: Int -> Char -> JSString -> JSStringjsaddle 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"
justifyRight :: Int -> Char -> JSString -> JSStringjsaddle 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"
justifyLeftI :: Integral a => a -> Char -> Stream Char -> Stream Charjsaddle Data.JSString.Internal.Fusion.Common No documentation available.
just_ :: forall a b f . Applicative f => LensLike f (Maybe a) (Maybe b) a blens-family Lens.Family2.Stock 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.
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.