Safe Haskell | None |
---|---|
Language | Haskell2010 |
Predicates for Foldable
.
Since: 0.1.0.0
Elements
Predicate for all elements satisfying some predicate.
Examples
>>>
validate @(All NonZero) Proxy [1..5]
Nothing
>>>
showRefineException <$> validate @(All NonZero) Proxy [0..5]
Just "RefineOtherException (NotEqualTo 0) \"Value does equal 0\""
Since: 0.1.0.0
Instances
Predicate p Word8 => Predicate (All p :: Type) ByteString Source # | Since: 0.1.0.0 |
Defined in Refined.Extras.Predicates.Foldable validate :: Proxy (All p) -> ByteString -> Maybe RefineException Source # | |
Predicate p Word8 => Predicate (All p :: Type) ByteString Source # | Since: 0.1.0.0 |
Defined in Refined.Extras.Predicates.Foldable validate :: Proxy (All p) -> ByteString -> Maybe RefineException Source # | |
Predicate p Char => Predicate (All p :: Type) Text Source # | Since: 0.1.0.0 |
Defined in Refined.Extras.Predicates.Foldable | |
Predicate p Char => Predicate (All p :: Type) Text Source # | Since: 0.1.0.0 |
Defined in Refined.Extras.Predicates.Foldable | |
(Foldable f, Predicate p a) => Predicate (All p :: Type) (f a) Source # | Since: 0.1.0.0 |
Defined in Refined.Extras.Predicates.Foldable | |
Generic (All p) Source # | |
Defined in Refined.Extras.Predicates.Foldable | |
type Rep (All p) Source # | Since: 0.1.0.0 |
Predicate for any element satisfying some predicate.
Examples
>>>
validate @(Any NonZero) Proxy [0,0,0,4]
Nothing
>>>
showRefineException <$> validate @(Any NonZero) Proxy [0,0,0]
Just "RefineOtherException (NotEqualTo 0) \"No element satisfied the predicate\""
Since: 0.1.0.0
Instances
Predicate p Word8 => Predicate (Any p :: Type) ByteString Source # | Since: 0.1.0.0 |
Defined in Refined.Extras.Predicates.Foldable validate :: Proxy (Any p) -> ByteString -> Maybe RefineException Source # | |
Predicate p Word8 => Predicate (Any p :: Type) ByteString Source # | Since: 0.1.0.0 |
Defined in Refined.Extras.Predicates.Foldable validate :: Proxy (Any p) -> ByteString -> Maybe RefineException Source # | |
Predicate p Char => Predicate (Any p :: Type) Text Source # | Since: 0.1.0.0 |
Defined in Refined.Extras.Predicates.Foldable | |
Predicate p Char => Predicate (Any p :: Type) Text Source # | Since: 0.1.0.0 |
Defined in Refined.Extras.Predicates.Foldable | |
(Foldable f, Predicate p a) => Predicate (Any p :: Type) (f a) Source # | Since: 0.1.0.0 |
Defined in Refined.Extras.Predicates.Foldable | |
Generic (Any p) Source # | |
Defined in Refined.Extras.Predicates.Foldable | |
type Rep (Any p) Source # | Since: 0.1.0.0 |