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.
-
base-prelude BasePrelude.Operators Boolean "and", lazy in the second argument
(
&& ) :: CanAndOrAsymmetric a b => a -> b -> AndOrType a bmixed-types-num Numeric.MixedTypes.Bool A synonym of and2.
(
&& ) :: CanAndOrSameType t => t -> t -> tmixed-types-num Numeric.OrdGenericBool No documentation available.
-
sayable Text.Sayable A helper operator to apply a Prettyprinter (Doc ann -> Doc ann) function (the first argument) to the Sayable in the second argument. This is different from the &% operator in that the former uses hcat to join two independent Doc Saying values, whereas this operator applies a transformation (e.g. Prettyprinter.annotate AnnValue or Prettyprinter.align . Prettyprinter.group) to the Doc in the second Saying argument.
>>> sez @"info" $ PP.group &! t'"hi" "hi"
-
sayable Text.Sayable A helper operator that applies the first argument (a Prettyprinter adaptation function) to the result of a Foldable collection of Sayable items. This is essentially a combination of the &! and &* operators where the first operation is applied to the entire list, rather than each element of the list (as with &!*).
>>> sez @"info" $ t'"three:" &- PP.align &!$* [1, 2, 3::Int] "three: 1, 2, 3"
As with the &!* operator (and unlike the &* operator), a null collection is passed to the converter first argument. @since: 1.1.0.0 -
sayable Text.Sayable A helper operator that is a combination of the &! and &* operators. It applies the first argument (which converts an array of 'Prettyprinter.Doc ann' elements into a single 'PrettyPrinter.Doc ann' element) to the second argument (which is a Foldable collection of Sayable items).
>>> sez @"info" $ t'"three:" &- PP.align . PP.vsep &!* [1, 2, 3::Int] "three: 1, \n 2, \n 3"
-
sayable Text.Sayable A helper operator that applies the first argument (which converts an array of 'Prettyprinter.Doc ann' elements to a single 'PrettyPrinter.Doc ann' element) to the second argument, which is a Foldable collection of Sayable items. This is essentially a combination of the &! and &:* operators. Unlike the other operators defined in this package, this is a trinary operator rather than a binary operator. Because function application (whitespace) is the highest precedence, the last argument will typically need a preceeding $ to prevent applying the second argument to the third argument before applying this operator.
>>> sez @"info" $ t'"three:" &- (PP.align . PP.vsep &!:* (t'" or")) [1, 2, 3::Int] "three: 1 or\n 2 or\n 3"
-
sayable Text.Sayable A helper operator allowing a Sayable item to be wrapped in a Maybe and a prettyprinter conversion as the first argument. This is a combination of the &! and &? operators.
>>> sez @"info" $ PP.group &!? Just (t'"hi") "hi"
@since: 1.1.0.0 (
&% ) :: forall (tag :: Symbol) m n . (Sayable tag m, Pretty n) => m -> n -> Saying tagsayable Text.Sayable A helper operator allowing a Sayable item to be composed with a Pretty item into a Saying. This is infrequently used and primarily allows the composition of a data object which has a Prettyprinter instance but no Sayable instance.
>>> sez @"info" $ t'"hello" &% (t'"world", t'"!") "hello (world, !)"
-
sayable Text.Sayable A helper operator allowing a Sayable item to be composed with a Foldable series of Sayable items. This can be used when the second argument is a List, Sequence, Set, etc. to add all elements of the set (comma-separated). Note: this instance makes it easy to output lists, Sequence, NonEmpty.List, etc., but it can have undesireable effects for data structures whose Foldable (Functor) is irregular... for example, folding over a tuple only returns the snd value of a tuple. Consider wrapping tuples in a newtype with an explicit Sayable to avoid this.
>>> sez @"info" $ t'"three:" &* [1, 2, 3::Int] "three: 1, 2, 3"
If the second argument is a null collection then no output is generated for it.