Hoogle Search

Within LTS Haskell 24.18 (ghc-9.10.3)

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

  1. bool :: BitGet Bool

    rattletrap Rattletrap.BitGet

    No documentation available.

  2. bool :: Bool -> BitPut

    rattletrap Rattletrap.BitPut

    No documentation available.

  3. bool :: Key -> TomlCodec Bool

    tomland Toml.Codec.Combinator.Primitive

    Codec for boolean values.

  4. bool :: Value Bool

    aeson-value-parser AesonValueParser

    No documentation available.

  5. bool :: a -> a -> Bool -> a

    classy-prelude-yesod ClassyPrelude.Yesod

    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
    

  6. bool :: a -> a -> Bool -> a

    control-bool Control.Bool

    bool a b is a function that returns a if the argument is True, otherwise returns b.

  7. bool :: Parser Bool

    json-stream Data.JsonStream.Parser

    Parse bool, skip if the type is not bool.

  8. bool :: Bool -> Doc ann

    prettyprinter-compat-annotated-wl-pprint Text.PrettyPrint.Annotated.Leijen

    No documentation available.

  9. bool :: Bool -> Doc

    prettyprinter-compat-wl-pprint Text.PrettyPrint.Leijen

    No documentation available.

  10. bool :: a -> a -> Bool -> a

    verset Verset

    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
    

Page 17 of many | Previous | Next