HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulebrick-2.10Haskell2010

Brick.Util

Utility functions.

  • 6 values
  • Packagebrick-2.10
  • Exports6
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceUtil.hs
valueclamp
  1. :: Ord a
  2. => a

    The minimum value

  3. -> a

    The maximum value

  4. -> a

    The value to clamp

  5. -> a
#

Given a minimum value and a maximum value, clamp a value to that range (values less than the minimum map to the minimum and values greater than the maximum map to the maximum).

Example3 expressions
clamp 1 10 1110clamp 1 10 22clamp 5 10 15
valueon
  1. :: Color

    The foreground color

  2. -> Color

    The background color

  3. -> Attr
#

Build an attribute from a foreground color and a background color. Intended to be used infix.

valuefg :: Color -> Attr
#

Create an attribute from the specified foreground color (the background color is the "default").

valuebg :: Color -> Attr
#

Create an attribute from the specified background color (the foreground color is the "default").

valuestyle :: Style -> Attr
#

Create an attribute from the specified style (the colors are the "default").