% -package:numeric-prelude

Forms the ratio of two integral numbers.
Concatenate two formatters. formatter1 % formatter2 is a formatter that accepts arguments for formatter1 and formatter2 and concatenates their results. For example
format1 :: Format r (Text -> r)
format1 = "Person's name is " % text
format2 :: Format r r
format2 = ", "
format3 :: Format r (Int -> r)
format3 = "age is " % hex
myFormat :: Format r (Text -> Int -> r)
myFormat = format1 % format2 % format3
Notice how the argument types of format1 and format3 are gathered into the type of myFormat. (This is actually the composition operator for Formats Category instance, but that is (at present) inconvenient to use with regular Prelude. So this function is provided as a convenience.)
Compose two optics of compatible flavours. Returns an optic of the appropriate supertype. If either or both optics are indexed, the composition preserves all the indices.
Concatenate two Format strings
A binary constructor for building up trees of weights.
The string %. May be useful while using like and concatenation (concat_ or ++., depending on your database). Note that you always have to type the parenthesis, for example:
name `like` (%) ++. val "John" ++. (%)
The aspect ratio of the width to the height for use with aspectRatio. Note that this is not the same % operator from the Data.Ratio module, although they do both semantically represent ratios. The same symbol is used to signify that the return value is a ratio.
Type family for normalized pair of Nats — Rat.
Infix synonym for quOf
Infix synonym for quOf
Infix synonym for quOf
This operator is an alternative for $ with a higher precedence. It is suitable for usage within applicative style code without the need to add parenthesis.
Concat two error message strings with a newline.
Format specific synonym of (.). This is typically easier to use than (.) is because it doesn't conflict with Prelude.(.).
Pastes one Plane onto another. To be used along with & like this:
d :: Plane
d =          blankPlane 100 100  &
(3, 4) % box '_' 3 5         &
(a, b) % cell 'A' # bold
Apply two formatters to a Message and combine the resulting Texts. With apologies to the formatting library for stealing their operator!
Combine two matplotlib commands
Formats a single value into a string without finalizing: leaving duplicate percent signs & remaining format sequences.
> "Hello %s!" % "World"
"Hello World!"
> "processor usage: %d%%" % 67
"processor usage: 67%%"
> "load avg: %.2f %.2f %.2f" % 0.666
"load avg: %0.67 %.2f %.2f"
Please use -% when formatting the last value into a string so that duplicate percent signs are removed.
Smart-constructor for Quotients
Append a constant string to a format string component. N.B.: in scanf, spaces in the format string match any number of whitespace character until the next nonspace character.
Forms the ratio of two Int numbers.
Adjust the target of an IndexedLens returning a supplementary result, or adjust all of the targets of an IndexedTraversal within the current state, and return a monoidal summary of the supplementary results.
l %%@= f ≡ state (l %%@~ f)
(%%@=) :: MonadState s m                 => IndexedLens i s s a b      -> (i -> a -> (r, b)) -> s -> m r
(%%@=) :: (MonadState s m, Monoid r) => IndexedTraversal i s s a b -> (i -> a -> (r, b)) -> s -> m r
Map over the target of a Lens or all of the targets of a Setter or Traversal in our monadic state.
>>> execState (do _1 %= f;_2 %= g) (a,b)
(f a,g b)
>>> execState (do both %= f) (a,b)
(f a,f b)
(%=) :: MonadState s m => Iso' s a       -> (a -> a) -> m ()
(%=) :: MonadState s m => Lens' s a      -> (a -> a) -> m ()
(%=) :: MonadState s m => Traversal' s a -> (a -> a) -> m ()
(%=) :: MonadState s m => Setter' s a    -> (a -> a) -> m ()
(%=) :: MonadState s m => ASetter s s a b -> (a -> b) -> m ()