| Safe Haskell | Safe-Inferred |
|---|
Prednote.Prebuilt
Description
Functions to work with Pred. This module works with Text and
produces Pred that make sparing use of color. For more control
over the Pred produced, use Prednote.Pred.Core.
Exports some names that conflict with Prelude names, so you might want to do something like
import qualified Prednote.Pred as P
- predicate :: Text -> (a -> Text) -> (a -> Bool) -> Pred a
- true :: Pred a
- false :: Pred a
- same :: Pred Bool
- wrap :: Text -> (a -> Text) -> (a -> b) -> Pred b -> Pred a
- visibility :: (Bool -> Visible) -> Pred a -> Pred a
- reveal :: Pred a -> Pred a
- hide :: Pred a -> Pred a
- showTrue :: Pred a -> Pred a
- showFalse :: Pred a -> Pred a
- all :: [Pred a] -> Pred a
- (&&&) :: Pred a -> Pred a -> Pred a
- any :: [Pred a] -> Pred a
- (|||) :: Pred a -> Pred a -> Pred a
- not :: Pred a -> Pred a
- fanAll :: (a -> [b]) -> Pred b -> Pred a
- fanAny :: (a -> [b]) -> Pred b -> Pred a
- fanAtLeast :: Int -> (a -> [b]) -> Pred b -> Pred a
Documentation
Arguments
| :: Text | Static label |
| -> (a -> Text) | Computes the dynamic label. Do not indicate whether the result
is |
| -> (a -> Bool) | Predicate function |
| -> Pred a |
Builds predicates.
Arguments
| :: (Bool -> Visible) | When applied to the |
| -> Pred a | |
| -> Pred a |
Creates a Pred with its visibility modified.
all :: [Pred a] -> Pred aSource
No child Pred may be False. An empty list of child Pred
returns True. Always visible.
any :: [Pred a] -> Pred aSource
At least one child Pred must be True. An empty list of child
Pred returns False. Always visible.
fanAll :: (a -> [b]) -> Pred b -> Pred aSource
No fanned-out item may be False. An empty list of child items
returns True.
fanAny :: (a -> [b]) -> Pred b -> Pred aSource
At least one fanned-out item must be True. An empty list of
child items returns False.
fanAtLeast :: Int -> (a -> [b]) -> Pred b -> Pred aSource
At least the given number of child items must be True.