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. (&&) :: Bool -> Bool -> Bool

    base-prelude BasePrelude.Operators

    Boolean "and", lazy in the second argument

  2. (&&) :: CanAndOrAsymmetric a b => a -> b -> AndOrType a b

    mixed-types-num Numeric.MixedTypes.Bool

    A synonym of and2.

  3. (&&) :: CanAndOrSameType t => t -> t -> t

    mixed-types-num Numeric.OrdGenericBool

    No documentation available.

  4. (&!) :: forall (tag :: Symbol) m . Sayable tag m => (Doc SayableAnn -> Doc SayableAnn) -> m -> Saying tag

    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"
    

  5. (&!$*) :: forall (tag :: Symbol) m t . (Sayable tag m, Foldable t) => (Doc SayableAnn -> Doc SayableAnn) -> t m -> Saying tag

    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

  6. (&!*) :: forall (tag :: Symbol) m t . (Sayable tag m, Foldable t) => ([Doc SayableAnn] -> Doc SayableAnn) -> t m -> Saying tag

    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"
    

  7. (&!:*) :: forall (tag :: Symbol) m t b . (Sayable tag b, Sayable tag m, Foldable t) => ([Doc SayableAnn] -> Doc SayableAnn) -> b -> t m -> Saying tag

    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"
    

  8. (&!?) :: forall (tag :: Symbol) e . Sayable tag e => (Doc SayableAnn -> Doc SayableAnn) -> Maybe e -> Saying tag

    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

  9. (&%) :: forall (tag :: Symbol) m n . (Sayable tag m, Pretty n) => m -> n -> Saying tag

    sayable 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, !)"
    

  10. (&*) :: forall (tag :: Symbol) m e t . (Sayable tag m, Sayable tag e, Foldable t) => m -> t e -> Saying tag

    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.

Page 17 of many | Previous | Next