Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

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

  1. bool :: TextParser Bool

    HaXml Text.XML.HaXml.Schema.Parse

    Parse a textual boolean, i.e. "true", "false", "0", or "1"

  2. bool :: a -> a -> Bool -> a

    basic-prelude CorePrelude

    Case analysis for the Bool type. bool f t p evaluates to f when p is False, and evaluates to t when p is True. This is equivalent to if p then t else f; that is, one can think of it as an if-then-else construct with its arguments reordered.

    Examples

    Basic usage:
    >>> bool "foo" "bar" True
    "bar"
    
    >>> bool "foo" "bar" False
    "foo"
    
    Confirm that bool f t p and if p then t else f are equivalent:
    >>> let p = True; f = "bar"; t = "foo"
    
    >>> bool f t p == if p then t else f
    True
    
    >>> let p = False
    
    >>> bool f t p == if p then t else f
    True
    

  3. bool :: a -> a -> Bool -> a

    classy-prelude ClassyPrelude

    Case analysis for the Bool type. bool f t p evaluates to f when p is False, and evaluates to t when p is True. This is equivalent to if p then t else f; that is, one can think of it as an if-then-else construct with its arguments reordered.

    Examples

    Basic usage:
    >>> bool "foo" "bar" True
    "bar"
    
    >>> bool "foo" "bar" False
    "foo"
    
    Confirm that bool f t p and if p then t else f are equivalent:
    >>> let p = True; f = "bar"; t = "foo"
    
    >>> bool f t p == if p then t else f
    True
    
    >>> let p = False
    
    >>> bool f t p == if p then t else f
    True
    

  4. bool :: GType

    glib System.Glib.GTypeConstants

    No documentation available.

  5. bool :: Bool -> Doc

    wl-pprint-text Text.PrettyPrint.Leijen.Text

    The document (bool b) shows the literal boolean b using text.

  6. bool :: Applicative m => Bool -> m Doc

    wl-pprint-text Text.PrettyPrint.Leijen.Text.Monadic

    The document (bool b) shows the literal boolean b using text.

  7. bool :: Decoder Bool

    dhall Dhall.Marshal.Decode

    Decode a Bool.

    >>> input bool "True"
    True
    

  8. bool :: Bool -> BV 1

    bv-sized Data.BitVector.Sized

    Construct a BV from a Bool.

  9. bool :: Value Bool

    postgresql-binary PostgreSQL.Binary.Decoding

    No documentation available.

  10. bool :: Bool -> Encoding

    postgresql-binary PostgreSQL.Binary.Encoding

    No documentation available.

Page 14 of many | Previous | Next