Safe Haskell | None |
---|---|
Language | Haskell2010 |
Dsl for evaluating and displaying type level expressions
Synopsis
- data I
- data Id
- data IdT
- data W (p :: k)
- data Msg prt p
- pe :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a))
- pe2 :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a))
- pe2n :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a))
- pu :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a))
- pun :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a))
- pe3 :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a))
- pl :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a))
- plc :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a))
- pz :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a))
- class P p a where
- runPQ :: (P p a, P q a, MonadEval m) => String -> Proxy p -> Proxy q -> POpts -> a -> [Holder] -> m (Either (TT x) (PP p a, PP q a, TT (PP p a), TT (PP q a)))
- evalBool :: (MonadEval m, P p a, PP p a ~ Bool) => Proxy p -> POpts -> a -> m (TT (PP p a))
- evalQuick :: forall p i. P p i => i -> Either String (PP p i)
basic types
identity function
>>>
pz @I 23
Present 23 PresentT 23
identity function that also displays the type information for debugging
>>>
pz @IdT 23
Present 23 PresentT 23
add a message to give more context to the evaluation tree
>>>
pe @(Msg "[somemessage] " Id) 999
P [somemessage] Id 999 PresentT 999
>>>
pe @(Msg Id 999) "info message:"
P info message:'999 PresentT 999
display evaluation tree
pe :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a)) Source #
displays the evaluation tree in plain text without colors
pe2 :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a)) Source #
displays the evaluation tree using colors
pu :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a)) Source #
display the evaluation tree using unicode and colors
pu
'(Id, "abc", 123) [1..4]
@
pe3 :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a)) Source #
same as pe2
but allows for wider data
pl :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a)) Source #
same as pz
but adds context to the end result
plc :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a)) Source #
same as pz
but with colors
pz :: forall p a. (Show (PP p a), P p a) => a -> IO (BoolT (PP p a)) Source #
skips the evaluation tree and just displays the end result
P class
This is the core class. Each instance of this class can be combined into a dsl using >>
Instances
GetBool b => P (b :: Bool) a Source # | pulls the type level
|
GetOrdering cmp => P (cmp :: Ordering) a Source # | extracts the value level representation of the promoted
|
KnownNat n => P (n :: Nat) a Source # | extracts the value level representation of the type level
|
KnownSymbol s => P (s :: Symbol) a Source # | pulls the type level
|
P () a Source # | extracts the value level representation of the type level '()
|
P () a Source # |
|
(Typeable a, Show a) => P IdT a Source # | |
Show a => P Id a Source # | |
P I a Source # | |
P Stdin a Source # | |
P TimeZt a Source # | |
P TimeUtc a Source # | |
P ReadEnvAll a Source # | |
Defined in Predicate.Prelude type PP ReadEnvAll a :: Type Source # eval :: MonadEval m => Proxy ReadEnvAll -> POpts -> a -> m (TT (PP ReadEnvAll a)) Source # | |
(Show l, IsList l, Show (Item l)) => P ToListExt l Source # | |
(Show (t a), Foldable t, t a ~ as) => P Null as Source # | |
(Show as, AsEmpty as) => P IsEmpty as Source # | |
(Show (ConsT s), Show s, Snoc s s (ConsT s) (ConsT s)) => P Unsnoc s Source # | |
(Show (ConsT s), Show s, Cons s s (ConsT s) (ConsT s)) => P Uncons s Source # | |
(Show t, Reversing t) => P ReverseL t Source # | |
(Show a, as ~ [a]) => P Reverse as Source # | |
Show a => P MkProxy a Source # | |
(Show a, as ~ [a]) => P Len as Source # | |
(Show a, IsText a) => P ToUpper a Source # | |
(Show a, IsText a) => P ToLower a Source # | |
(Show (t (t a)), Show (t a), Monad t) => P Join (t (t a)) Source # | |
(Show (t a), Show (t (t a)), Comonad t) => P Duplicate (t a) Source # | |
(Show (t a), Show a, Comonad t) => P Extract (t a) Source # | |
(Show (f (t a)), Show (t (f a)), Traversable t, Applicative f) => P Sequence (t (f a)) Source # | |
(Show (t a), Foldable t, Show a) => P ToList (t a) Source # | |
Show a => P Pairs [a] Source # | |
(Show a, Show b) => P PartitionThese [These a b] Source # | |
Defined in Predicate.Prelude type PP PartitionThese [These a b] :: Type Source # eval :: MonadEval m => Proxy PartitionThese -> POpts -> [These a b] -> m (TT (PP PartitionThese [These a b])) Source # | |
(Show a, Show b) => P PartitionEithers [Either a b] Source # | |
Defined in Predicate.Prelude | |
Functor f => P FMapSnd (f (x, a)) Source # | |
Functor f => P FMapFst (f (a, x)) Source # | |
(Ord a, Show a) => P Max [a] Source # | |
(Ord a, Show a) => P Min [a] Source # | |
(Num a, Show a) => P Sum [a] Source # | |
Show a => P Tails [a] Source # | |
Show a => P Inits [a] Source # | |
Typeable a => P Unproxy (Proxy a) Source # | |
(Show (p (p a b) c), Show (p a (p b c)), Assoc p) => P Unassoc (p a (p b c)) Source # | |
(Show (p (p a b) c), Show (p a (p b c)), Assoc p) => P Assoc (p (p a b) c) Source # | |
(Show (p a b), Swap p, Show (p b a)) => P Swap (p a b) Source # | |
P ([] :: [k]) a Source # | extracts the value level representation of the type level '[]
|
(KnownSymbol s, NullT s ~ False) => P (Char1 s :: Type) a Source # | |
(Show l, IsList l, l ~ l') => P (FromListExt l' :: Type) l Source # | |
Defined in Predicate.Prelude type PP (FromListExt l') l :: Type Source # eval :: MonadEval m => Proxy (FromListExt l') -> POpts -> l -> m (TT (PP (FromListExt l') l)) Source # | |
Typeable t => P (Hole t :: Type) a Source # | Acts as a proxy in this dsl where you can explicitly set the Type. It is passed around as an argument to help the type checker when needed.
see 'ReadP, |
P (Nothing :: Maybe a1) (Maybe a2) Source # | expects Nothing otherwise it fails if the value is Nothing then it returns 'Proxy a' as this provides more information than '()'
|
(a ~ Item t, Show t, IsList t) => P (FromList t :: Type) [a] Source # | |
(Show (f (t a)), Show (f a), Applicative t, Functor f) => P (Pure2 t :: Type) (f a) Source # | |
P (Proxy t :: Type) a Source # | |
P p a => P (W p :: Type) a Source # | |
(Show a, PP p x ~ Maybe a, P p x) => P (Just p :: Type) x Source # | |
(Show s, Snoc s s (ConsT s) (ConsT s), PP p x ~ s, P p x) => P (Init p :: Type) x Source # | |
(Show (ConsT s), Show s, Snoc s s (ConsT s) (ConsT s), PP p x ~ s, P p x) => P (Last p :: Type) x Source # | |
(Show s, Cons s s (ConsT s) (ConsT s), PP p x ~ s, P p x) => P (Tail p :: Type) x Source # | |
(Show (ConsT s), Show s, Cons s s (ConsT s) (ConsT s), PP p x ~ s, P p x) => P (Head p :: Type) x Source # | |
(PP p x ~ String, P p x) => P (ReadEnv p :: Type) x Source # | |
(PP p x ~ String, P p x) => P (ReadDir p :: Type) x Source # | |
(PP p x ~ String, P p x) => P (ReadFile p :: Type) x Source # | |
P p x => P (Hide p :: Type) x Source # | |
(PP p x ~ [Int], P p x) => P (Luhn p :: Type) x Source # | |
P (EmptyList' t :: Type) x Source # | |
Defined in Predicate.Prelude type PP (EmptyList' t) x :: Type Source # eval :: MonadEval m => Proxy (EmptyList' t) -> POpts -> x -> m (TT (PP (EmptyList' t) x)) Source # | |
(PP p x ~ t a, P p x, Show (t a), Foldable t, Show a) => P (ToList' p :: Type) x Source # | |
(PP p x ~ Bool, P p x) => P (Not p :: Type) x Source # | |
(Show (PP p a), P p a) => P (Skip p :: Type) a Source # | |
(Show a, P p a, PP p a ~ Bool) => P (GuardSimple p :: Type) a Source # | |
Defined in Predicate.Prelude type PP (GuardSimple p) a :: Type Source # eval :: MonadEval m => Proxy (GuardSimple p) -> POpts -> a -> m (TT (PP (GuardSimple p) a)) Source # | |
(PP p x ~ t a, P p x, Show (t a), Foldable t, a ~ Bool) => P (Ors p :: Type) x Source # | |
(PP p x ~ t a, P p x, Show (t a), Foldable t, a ~ Bool) => P (Ands p :: Type) x Source # | |
Typeable t => P (ProxyT' t :: Type) a Source # | |
(Show a, Show (t [a]), PP p x ~ t [a], P p x, Foldable t) => P (Concat p :: Type) x Source # | |
(PP p x ~ [a], P p x, Show a, Monoid a) => P (MConcat p :: Type) x Source # | |
(PP p x ~ a, P p x, Show a) => P (MkJust p :: Type) x Source # | |
P (MkNothing' t :: Type) a Source # | |
Defined in Predicate.Prelude type PP (MkNothing' t) a :: Type Source # eval :: MonadEval m => Proxy (MkNothing' t) -> POpts -> a -> m (TT (PP (MkNothing' t) a)) Source # | |
(Show (PP t a), Monoid (PP t a)) => P (MEmptyT' t :: Type) a Source # | |
(PP p x ~ a, P p x, Show a, Integral a) => P (Prime p :: Type) x Source # | |
(Show a, Enum a, PP p x ~ a, P p x) => P (FromEnum p :: Type) x Source # | |
(Show a, Enum a, PP p x ~ a, P p x) => P (Pred p :: Type) x Source # | |
(Show a, Enum a, PP p x ~ a, P p x) => P (Succ p :: Type) x Source # | |
(Show a, Show t, Coercible t a) => P (Coerce t :: Type) a Source # | |
(PP p x ~ s, P p x, Show s, Show (Unwrapped s), Wrapped s) => P (Unwrap p :: Type) x Source # | |
(Show (PP p x), Num (PP p x), P p x) => P (Signum p :: Type) x Source # | |
(Show (PP p x), Num (PP p x), P p x) => P (Abs p :: Type) x Source # | |
(Show (PP p x), Num (PP p x), P p x) => P (Negate p :: Type) x Source # | |
P (DoExpandT ps) a => P (Do ps :: Type) a Source # | |
(a ~ PP p x, Show a, Real a, P p x) => P (ToRational p :: Type) x Source # | |
Defined in Predicate.Prelude type PP (ToRational p) x :: Type Source # eval :: MonadEval m => Proxy (ToRational p) -> POpts -> x -> m (TT (PP (ToRational p) x)) Source # | |
(Show (ExtractL6T (PP p x)), ExtractL6C (PP p x), P p x, Show (PP p x)) => P (L6 p :: Type) x Source # | |
(Show (ExtractL5T (PP p x)), ExtractL5C (PP p x), P p x, Show (PP p x)) => P (L5 p :: Type) x Source # | |
(Show (ExtractL4T (PP p x)), ExtractL4C (PP p x), P p x, Show (PP p x)) => P (L4 p :: Type) x Source # | |
(Show (ExtractL3T (PP p x)), ExtractL3C (PP p x), P p x, Show (PP p x)) => P (Thd p :: Type) x Source # | |
(Show (ExtractL2T (PP p x)), ExtractL2C (PP p x), P p x, Show (PP p x)) => P (Snd p :: Type) x Source # | |
(Show (ExtractL1T (PP p x)), ExtractL1C (PP p x), P p x, Show (PP p x)) => P (Fst p :: Type) x Source # | |
(PP p x ~ t a, P p x, Show (t a), Foldable t) => P (Length p :: Type) x Source # | |
(PP p x ~ Day, P p x) => P (UnMkDay p :: Type) x Source # | |
(Show (PP p x), P p x) => P (ShowP p :: Type) x Source # | |
(PP p x ~ [a], P p x, Show a) => P (Ones p :: Type) x Source # | |
(PP p x ~ ([String] -> String), P p x) => P (MakeRR3 p :: Type) x Source # | |
(PP p x ~ (String -> String), P p x) => P (MakeRR2 p :: Type) x Source # | |
(PP p x ~ (String -> [String] -> String), P p x) => P (MakeRR1 p :: Type) x Source # | |
(PP p x ~ String, P p x) => P (MakeRR p :: Type) x Source # | |
(Show (PP p a2), P p a2, Show a2) => P (Just p :: Maybe a1) (Maybe a2) Source # | extracts the 'a' from type level 'Maybe a' if the value exists
|
(GetLen ps, P (ParaImpl (LenT ps) ps) [a]) => P (Para ps :: Type) [a] Source # | |
(Show (f a), Show (f (PP t (f a))), Functor f, Monoid (PP t (f a))) => P (MEmptyT2' t :: Type) (f a) Source # | |
(Show (f a), Show (f t), Coercible t a, Functor f) => P (Coerce2 t :: Type) (f a) Source # | |
(Show (PP p a2), Show a2, P (p1 ': ps) a2, PP (p1 ': ps) a2 ~ [PP p1 a2], P p a2, PP p a2 ~ PP p1 a2) => P (p ': (p1 ': ps) :: [a1]) a2 Source # | |
(Show (PP p a), Show a, P p a) => P (p ': ([] :: [k]) :: [k]) a Source # | runs each predicate in turn from the promoted list
|
P (DoExpandT (RepeatT n p)) a => P (DoN n p :: Type) a Source # | |
P (RepeatT n p) a => P (Repeat n p :: Type) a Source # | |
(PP p x ~ a, P p x, Show a, 2 <= n, n <= 36, KnownNat n, Integral a) => P (ShowBase n p :: Type) x Source # | |
(P p x, PP p x ~ a, Show (t a), Show a, Alternative t) => P (EmptyT t p :: Type) x Source # | |
(P p x, Show (PP p x), Show (t (PP p x)), Applicative t) => P (Pure t p :: Type) x Source # | |
(P (ParaImpl (LenT (RepeatT n p)) (RepeatT n p)) [a], GetLen (RepeatT n p)) => P (ParaN n p :: Type) [a] Source # | |
(GetLen ps, P (BoolsImpl (LenT ps) ps) [a], PP (BoolsImpl (LenT ps) ps) [a] ~ Bool) => P (Bools ps :: Type) [a] Source # | |
(GetLen ps, P (GuardsImpl (LenT ps) ps) [a]) => P (Guards ps :: Type) [a] Source # | |
(P def (Proxy a), PP def (Proxy a) ~ a, KnownNat n, Show a) => P (Ix n def :: Type) [a] Source # | |
(P prt a, PP prt a ~ String, P p a) => P (Msg prt p :: Type) a Source # | |
(PP p x ~ String, PP q x ~ These a b, P p x, P q x) => P (TheseFail p q :: Type) x Source # | |
(PP p x ~ String, PP q x ~ These a b, P p x, P q x) => P (ThatFail p q :: Type) x Source # | |
(PP p x ~ String, PP q x ~ These a b, P p x, P q x) => P (ThisFail p q :: Type) x Source # | |
(PP q x ~ These a b, PP p x ~ (a, b), P q x, P p x) => P (TheseDef p q :: Type) x Source # | |
(PP q x ~ These a b, PP p x ~ b, P q x, P p x) => P (ThatDef p q :: Type) x Source # | |
(PP q x ~ These a b, PP p x ~ a, P q x, P p x) => P (ThisDef p q :: Type) x Source # | |
(PP p (a, x) ~ String, PP q x ~ Either a b, P p (a, x), P q x) => P (RightFail p q :: Type) x Source # | |
(PP p (b, x) ~ String, PP q x ~ Either a b, P p (b, x), P q x) => P (LeftFail p q :: Type) x Source # | |
(PP q x ~ Either a b, PP p (a, x) ~ b, P q x, P p (a, x)) => P (RightDef p q :: Type) x Source # | |
(PP q x ~ Either a b, PP p (b, x) ~ a, P q x, P p (b, x)) => P (LeftDef p q :: Type) x Source # | |
(PP p x ~ String, PP q x ~ Maybe a, P p x, P q x) => P (JustFail p q :: Type) x Source # | |
(PP p x ~ a, PP q x ~ Maybe a, P p x, P q x) => P (JustDef p q :: Type) x Source # | |
(P p x, P q x, PP p x ~ (a -> b), FnT (PP p x) ~ b, PP q x ~ a, Show a, Show b) => P (q & p :: Type) x Source # | |
(P p x, P q x, PP p x ~ (a -> b), FnT (PP p x) ~ b, PP q x ~ a, Show a, Show b) => P (p $ q :: Type) x Source # | |
(P p x, P q x, Show (t b), Alternative t, t b ~ PP p x, PP q x ~ t b) => P (p <|> q :: Type) x Source # | |
(Show (t c), P p x, P q x, Show (t b), Applicative t, t b ~ PP p x, PP q x ~ t c) => P (p <* q :: Type) x Source # | |
(P p x, P q x, Show (PP p x), Functor t, PP q x ~ t c, ApplyConstT (PP q x) (PP p x) ~ t (PP p x)) => P (p <$ q :: Type) x Source # | |
(PrintC bs, (b, bs) ~ InductTupleP y, InductTupleC y, PrintfArg b, PP s x ~ String, PP p x ~ y, P s x, P p x, CheckT (PP p x) ~ True) => P (PrintT s p :: Type) x Source # | |
(Semigroup (PP p x), PP p x ~ PP q x, P p x, Show (PP q x), P q x) => P (p <> q :: Type) x Source # | |
(PrintfArg (PP p x), Show (PP p x), PP s x ~ String, P s x, P p x) => P (PrintF s p :: Type) x Source # | |
(PP p x ~ [a], PP q x ~ PP p x, P p x, P q x, Show a) => P (Intercalate p q :: Type) x Source # | |
Defined in Predicate.Prelude type PP (Intercalate p q) x :: Type Source # eval :: MonadEval m => Proxy (Intercalate p q) -> POpts -> x -> m (TT (PP (Intercalate p q) x)) Source # | |
(PP p a ~ [x], PP q a ~ [y], P p a, P q a, Show x, Show y) => P (Zip p q :: Type) a Source # | |
(PP p a ~ [x], PP q a ~ [y], P p a, P q a, Show x, Show y) => P (ZipThese p q :: Type) a Source # | |
(Show x, P p x, Typeable (PP t (PP p x)), Show (PP t (PP p x)), FoldableWithIndex (PP t (PP p x)) f, PP p x ~ f a, Show a) => P (IToList' t p :: Type) x Source # | |
(PP p a ~ String, PP p a ~ PP q a, P p a, P q a) => P (OrdI p q :: Type) a Source # | |
(Ord (PP p a), PP p a ~ PP q a, P p a, Show (PP q a), P q a) => P (OrdP p q :: Type) a Source # | |
(P p a, P q a, PP p a ~ Bool, PP q a ~ Bool) => P (p ~> q :: Type) a Source # | |
(P p a, P q a, PP p a ~ Bool, PP q a ~ Bool) => P (p || q :: Type) a Source # | |
(P p a, P q a, PP p a ~ Bool, PP q a ~ Bool) => P (p && q :: Type) a Source # | |
(Show (PP p a), Show (PP q (PP p a)), P p a, P q (PP p a)) => P (p >> q :: Type) a Source # | |
(Show a, P prt a, PP prt a ~ String, P p a, PP p a ~ Bool) => P (Guard prt p :: Type) a Source # | |
(PP p a ~ PP q a, P p a, P q a, Show (PP p a), Integral (PP p a)) => P (QuotRem p q :: Type) a Source # | |
(PP p a ~ PP q a, P p a, P q a, Show (PP p a), Integral (PP p a)) => P (DivMod p q :: Type) a Source # | |
(PP p a ~ PP q a, P p a, P q a, Show (PP p a), Integral (PP p a)) => P (Mod p q :: Type) a Source # | |
(PP p a ~ PP q a, P p a, P q a, Show (PP p a), Integral (PP p a)) => P (Div p q :: Type) a Source # | |
(P p x, P q ((String, x), Proxy (PP p x)), PP p x ~ PP q ((String, x), Proxy (PP p x))) => P (Catch p q :: Type) x Source # | |
(P prt a, PP prt a ~ String) => P (Fail t prt :: Type) a Source # | |
(P p x, PP q a ~ [x], PP p x ~ Bool, P q a) => P (Break p q :: Type) a Source # | |
(P p x, Show x, PP q a ~ [x], PP p x ~ Bool, P q a) => P (Partition p q :: Type) a Source # | |
(Show (PP p a), P p a, PP q x ~ f a, P q x, Show a, Show (f a), Foldable f) => P (Map p q :: Type) x Source # | |
(PP q a ~ s, PP p s ~ Maybe (b, s), P q a, P p s, Show s, Show b) => P (Unfoldr p q :: Type) a Source # | |
(P p x, P q x, PP p x ~ a, Show a, PP q x ~ a, Enum a) => P (EnumFromTo p q :: Type) x Source # | |
Defined in Predicate.Prelude type PP (EnumFromTo p q) x :: Type Source # eval :: MonadEval m => Proxy (EnumFromTo p q) -> POpts -> x -> m (TT (PP (EnumFromTo p q) x)) Source # | |
(P p x, P q x, Show (PP q x), Show (PP p x), Snoc (PP p x) (PP p x) (PP q x) (PP q x)) => P (p +: q :: Type) x Source # | |
(P p x, P q x, Show (PP p x), Show (PP q x), Cons (PP q x) (PP q x) (PP p x) (PP p x)) => P (p :+ q :: Type) x Source # | |
(P q a, P p a, Show (PP p a), Ixed (PP p a), PP q a ~ Index (PP p a), Show (Index (PP p a)), Show (IxValue (PP p a))) => P (Lookup p q :: Type) a Source # | |
(Show a, Show (t a), PP p x ~ t a, P p x, Integral (PP n x), P n x, Foldable t) => P (Cycle n p :: Type) x Source # | |
(P p a, P q a, Show (PP p a), Show (PP q a)) => P (MkThese p q :: Type) a Source # | |
(Show (PP p x), P p x) => P (MkThat' t p :: Type) x Source # | |
(Show (PP p x), P p x) => P (MkThis' t p :: Type) x Source # | |
(Show (PP p x), P p x) => P (MkRight' t p :: Type) x Source # | |
(Show (PP p x), P p x) => P (MkLeft' t p :: Type) x Source # | |
(P n a, Integral (PP n a), Semigroup (PP p a), P p a, Show (PP p a)) => P (STimes n p :: Type) a Source # | |
([PP p a] ~ PP q a, P p a, P q a, Show (PP p a), Eq (PP p a)) => P (Elem p q :: Type) a Source # | |
(P def (Proxy (PP t a)), PP def (Proxy (PP t a)) ~ PP t a, Show a, Show (PP t a), Bounded (PP t a), Enum (PP t a), Integral a) => P (ToEnumBDef' t def :: Type) a Source # | |
Defined in Predicate.Prelude type PP (ToEnumBDef' t def) a :: Type Source # eval :: MonadEval m => Proxy (ToEnumBDef' t def) -> POpts -> a -> m (TT (PP (ToEnumBDef' t def) a)) Source # | |
(PP p x ~ a, P p x, Show a, Enum (PP t x), Show (PP t x), Integral a) => P (ToEnum' t p :: Type) x Source # | |
(PP q x ~ a, P q x, P p (Proxy a), PP p (Proxy a) ~ a, Show a, Eq a, Bounded a, Enum a) => P (PredB p q :: Type) x Source # | |
(PP q x ~ a, P q x, P p (Proxy a), PP p (Proxy a) ~ a, Show a, Eq a, Bounded a, Enum a) => P (SuccB p q :: Type) x Source # | |
(Show (PP p x), P p x, Unwrapped (PP s x) ~ PP p x, Wrapped (PP s x), Show (PP s x)) => P (Wrap' s p :: Type) x Source # | |
(Integral (PP p x), Integral (PP q x), Eq (PP q x), P p x, P q x, Show (PP p x), Show (PP q x)) => P (p % q :: Type) x Source # | |
(PP p a ~ PP q a, Eq (PP q a), P p a, P q a, Show (PP p a), Fractional (PP p a)) => P (p / q :: Type) a Source # | |
(PP p a ~ [b], P n a, P p a, Show b, Integral (PP n a)) => P (SplitAt n p :: Type) a Source # | |
(P ns x, P p x, PP p x ~ [a], Show n, Show a, PP ns x ~ [n], Integral n) => P (SplitAts ns p :: Type) x Source # | |
(Show (PP p a), P b a, P p a, PP b a ~ Bool) => P (MaybeBool b p :: Type) a Source # | |
(Show (PP p x), P p x, Show (PP t x), RealFrac (PP p x), Integral (PP t x)) => P (Floor' t p :: Type) x Source # | |
(Show (PP p x), P p x, Show (PP t x), RealFrac (PP p x), Integral (PP t x)) => P (Ceiling' t p :: Type) x Source # | |
(Show (PP p x), P p x, Show (PP t x), RealFrac (PP p x), Integral (PP t x)) => P (Truncate' t p :: Type) x Source # | |
(P r a, PP r a ~ Rational, Show (PP t a), Fractional (PP t a)) => P (FromRational' t r :: Type) a Source # | |
Defined in Predicate.Prelude type PP (FromRational' t r) a :: Type Source # eval :: MonadEval m => Proxy (FromRational' t r) -> POpts -> a -> m (TT (PP (FromRational' t r) a)) Source # | |
(Num (PP t a), Integral (PP n a), P n a, Show (PP t a), Show (PP n a)) => P (FromIntegral' t n :: Type) a Source # | |
Defined in Predicate.Prelude type PP (FromIntegral' t n) a :: Type Source # eval :: MonadEval m => Proxy (FromIntegral' t n) -> POpts -> a -> m (TT (PP (FromIntegral' t n) a)) Source # | |
(Num (PP t a), Integral (PP n a), P n a, Show (PP t a)) => P (FromInteger' t n :: Type) a Source # | |
Defined in Predicate.Prelude type PP (FromInteger' t n) a :: Type Source # eval :: MonadEval m => Proxy (FromInteger' t n) -> POpts -> a -> m (TT (PP (FromInteger' t n) a)) Source # | |
(P s a, PP s a ~ String, Show (PP t a), IsString (PP t a)) => P (FromStringP' t s :: Type) a Source # | |
Defined in Predicate.Prelude type PP (FromStringP' t s) a :: Type Source # eval :: MonadEval m => Proxy (FromStringP' t s) -> POpts -> a -> m (TT (PP (FromStringP' t s) a)) Source # | |
(P p (a, a), P q x, Show a, PP q x ~ [a], PP p (a, a) ~ Ordering) => P (SortBy p q :: Type) x Source # | |
(P p x, PP p x ~ String, Typeable (PP t x), Show (PP t x), Read (PP t x)) => P (ReadMaybe' t p :: Type) x Source # | |
Defined in Predicate.Prelude type PP (ReadMaybe' t p) x :: Type Source # eval :: MonadEval m => Proxy (ReadMaybe' t p) -> POpts -> x -> m (TT (PP (ReadMaybe' t p) x)) Source # | |
(P p x, PP p x ~ String, Typeable (PP t x), Show (PP t x), Read (PP t x)) => P (ReadP' t p :: Type) x Source # | |
(PP p x ~ String, FormatTime (PP q x), P p x, Show (PP q x), P q x) => P (FormatTimeP p q :: Type) x Source # | |
Defined in Predicate.Prelude type PP (FormatTimeP p q) x :: Type Source # eval :: MonadEval m => Proxy (FormatTimeP p q) -> POpts -> x -> m (TT (PP (FormatTimeP p q) x)) Source # | |
(P p a, PP p a ~ Bool, PP q x ~ f a, P q x, Show a, Foldable f) => P (Any p q :: Type) x Source # | |
(P p a, PP p a ~ Bool, PP q x ~ f a, P q x, Show a, Foldable f) => P (All p q :: Type) x Source # | |
(P q a, Show a, Show (PP q a), PP p (Proxy (PP q a)) ~ PP q a, P p (Proxy (PP q a))) => P (MaybeIn p q :: Type) (Maybe a) Source # | |
(Show (PP p a), Show (PP q b), P p a, P q b, Show a, Show b) => P (p +++ q :: Type) (Either a b) Source # | |
(Show (PP p a), P p a, P q b, PP p a ~ PP q b, Show a, Show b) => P (p ||| q :: Type) (Either a b) Source # | |
(Show (PP p a), Show (PP q b), P p a, P q b, Show a, Show b) => P (p *** q :: Type) (a, b) Source # | |
(GetBool r, PP p x ~ String, P p x, IsText (PP q x), P q x) => P (StripLR r p q :: Type) x Source # | |
(KnownNat n, PrintC bs, (b, bs) ~ InductListP n a, InductListC n a, PrintfArg b, PP s x ~ String, PP p x ~ [a], P s x, P p x) => P (PrintL n s p :: Type) x Source # | |
(Typeable (PP t x), BetweenT 2 36 n, Show (PP t x), Num (PP t x), KnownNat n, PP p x ~ String, P p x) => P (ReadBase' t n p :: Type) x Source # | |
(PP p a ~ String, GetOrd o, PP p a ~ PP q a, P p a, P q a) => P (CmpI o p q :: Type) a Source # | |
(GetOrd o, Ord (PP p a), Show (PP p a), PP p a ~ PP q a, P p a, P q a) => P (Cmp o p q :: Type) a Source # | |
(GetROpts rs, PP p x ~ String, PP q x ~ String, P p x, P q x) => P (Resplit' rs p q :: Type) x Source # | |
(GetROpts rs, PP p x ~ String, PP q x ~ String, P p x, P q x) => P (RescanRanges' rs p q :: Type) x Source # | |
Defined in Predicate.Prelude type PP (RescanRanges' rs p q) x :: Type Source # eval :: MonadEval m => Proxy (RescanRanges' rs p q) -> POpts -> x -> m (TT (PP (RescanRanges' rs p q) x)) Source # | |
(GetROpts rs, PP p x ~ String, PP q x ~ String, P p x, P q x) => P (Rescan' rs p q :: Type) x Source # | |
(GetROpts rs, PP p x ~ String, PP q x ~ String, P p x, P q x) => P (Re' rs p q :: Type) x Source # | |
(GetLen (ToGuardsT prt (RepeatT n p)), P (GuardsImpl (LenT (ToGuardsT prt (RepeatT n p))) (ToGuardsT prt (RepeatT n p))) [a]) => P (GuardsN prt n p :: Type) [a] Source # | |
(GetLen (ToGuardsT prt (RepeatT n p)), PP (BoolsImpl (LenT (ToGuardsT prt (RepeatT n p))) (ToGuardsT prt (RepeatT n p))) [a] ~ Bool, P (BoolsImpl (LenT (ToGuardsT prt (RepeatT n p))) (ToGuardsT prt (RepeatT n p))) [a]) => P (BoolsN prt n p :: Type) [a] Source # | |
(PP r a ~ y, P r a, PP p a ~ [x], PP q a ~ [y], P p a, P q a, Show x, Show y) => P (ZipR r p q :: Type) a Source # | |
(PP l a ~ x, P l a, PP p a ~ [x], PP q a ~ [y], P p a, P q a, Show x, Show y) => P (ZipL l p q :: Type) a Source # | |
(Show (PP r a), P p a, PP p a ~ Bool, P q a, P r a, PP q a ~ PP r a) => P (If p q r :: Type) a Source # | |
(PP p (b, a) ~ b, PP q x ~ b, PP r x ~ [a], P p (b, a), P q x, P r x, Show b, Show a) => P (Scanl p q r :: Type) x Source # | |
(P q a, P p a, Show (PP p a), Ixed (PP p a), PP q a ~ Index (PP p a), Show (Index (PP p a)), Show (IxValue (PP p a)), P r (Proxy (IxValue (PP p a))), PP r (Proxy (IxValue (PP p a))) ~ IxValue (PP p a)) => P (IxL p q r :: Type) a Source # | |
(Show (PP p a), P p a, Show (PP q a), P q a, P b a, PP b a ~ Bool) => P (EitherBool b p q :: Type) a Source # | |
Defined in Predicate.Prelude type PP (EitherBool b p q) a :: Type Source # eval :: MonadEval m => Proxy (EitherBool b p q) -> POpts -> a -> m (TT (PP (EitherBool b p q) a)) Source # | |
(P p x, P q x, P r x, PP p x ~ Int, PP q x ~ Int, PP r x ~ Int) => P (MkDay' p q r :: Type) x Source # | |
(ParseTime (PP t a), Typeable (PP t a), Show (PP t a), P p a, P q a, PP p a ~ [String], PP q a ~ String) => P (ParseTimes' t p q :: Type) a Source # | |
Defined in Predicate.Prelude type PP (ParseTimes' t p q) a :: Type Source # eval :: MonadEval m => Proxy (ParseTimes' t p q) -> POpts -> a -> m (TT (PP (ParseTimes' t p q) a)) Source # | |
(ParseTime (PP t a), Typeable (PP t a), Show (PP t a), P p a, P q a, PP p a ~ String, PP q a ~ String) => P (ParseTimeP' t p q :: Type) a Source # | |
Defined in Predicate.Prelude type PP (ParseTimeP' t p q) a :: Type Source # eval :: MonadEval m => Proxy (ParseTimeP' t p q) -> POpts -> a -> m (TT (PP (ParseTimeP' t p q) a)) Source # | |
(Ord (PP p x), Show (PP p x), PP r x ~ PP p x, PP r x ~ PP q x, P p x, P q x, P r x) => P (Between' p q r :: Type) x Source # | |
(Show a, Show b, Show (PP p a), P p a, P q b, P r (a, b), PP p a ~ PP q b, PP p a ~ PP r (a, b), PP q b ~ PP r (a, b)) => P (TheseIn p q r :: Type) (These a b) Source # | |
(FailUnlessT (LenT ps == LenT qs) (((Text "lengths are not the same " :<>: ShowType (LenT ps)) :<>: Text " vs ") :<>: ShowType (LenT qs)), P (CaseImpl (LenT ps) e ps qs r) x) => P (Case e ps qs r :: Type) x Source # | |
(P s x, P p (x, a), P q (x, b), P r (x, (a, b)), PP s x ~ These a b, PP p (x, a) ~ c, PP q (x, b) ~ c, PP r (x, (a, b)) ~ c) => P (TheseX p q r s :: Type) x Source # | |
Show a => P (Proxy :: Proxy t) a Source # | converts the value to the corresponding
|
(Show a2, Show (PP p a2), P p a2) => P (Right p :: Either a1 b) (Either x a2) Source # | extracts the 'b' from type level 'Either a b' if the value exists
|
(Show a2, Show (PP p a2), P p a2) => P (Left p :: Either a1 b) (Either a2 x) Source # | extracts the 'a' from type level 'Either a b' if the value exists
|
(Show a2, Show (PP p a2), P p a2) => P (That p :: These a1 b) (These x a2) Source # | extracts the 'b' from type level 'These a b' if the value exists
|
(Show a2, Show (PP p a2), P p a2) => P (This p :: These a1 b) (These a2 x) Source # | extracts the 'a' from type level 'These a b' if the value exists
|
(P p a, P q a) => P ((,) p q :: (k2, k1)) a Source # | run the predicates in a promoted 2-tuple; similar to
|
(Show a2, Show b2, P p a2, P q b2, Show (PP p a2), Show (PP q b2)) => P (These p q :: These a1 b1) (These a2 b2) Source # | extracts the (a,b) from type level 'These a b' if the value exists
|
(P p a, P q a, P r a) => P ((,,) p q r :: (k3, k2, k1)) a Source # | run the predicates in a promoted 3-tuple
|
(P p a, P q a, P r a, P s a) => P ((,,,) p q r s :: (k4, k3, k2, k1)) a Source # | run the predicates in a promoted 4-tuple
|
evaluation methods
runPQ :: (P p a, P q a, MonadEval m) => String -> Proxy p -> Proxy q -> POpts -> a -> [Holder] -> m (Either (TT x) (PP p a, PP q a, TT (PP p a), TT (PP q a))) Source #