Hoogle Search
Within LTS Haskell 22.19 (ghc-9.6.4)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
base-compat-batteries Data.Monoid.Compat Boolean monoid under conjunction (&&).
>>> getAll (All True <> mempty <> All False) False
>>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8])) False
-
base-compat-batteries Data.Monoid.Compat No documentation available.
-
base-compat-batteries Data.Semigroup.Compat Boolean monoid under conjunction (&&).
>>> getAll (All True <> mempty <> All False) False
>>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8])) False
-
base-compat-batteries Data.Semigroup.Compat No documentation available.
class (
All F c xs, SListI xs) => All (c :: k -> Constraint) (xs :: [k])generics-sop Generics.SOP Require a constraint for every element of a list. If you have a datatype that is indexed over a type-level list, then you can use All to indicate that all elements of that type-level list must satisfy a given constraint. Example: The constraint
All Eq '[ Int, Bool, Char ]
is equivalent to the constraint(Eq Int, Eq Bool, Eq Char)
Example: A type signature such asf :: All Eq xs => NP I xs -> ...
means that f can assume that all elements of the n-ary product satisfy Eq. Note on superclasses: ghc cannot deduce superclasses from All constraints. You might expect the following to compileclass (Eq a) => MyClass a foo :: (All Eq xs) => NP f xs -> z foo = [..] bar :: (All MyClass xs) => NP f xs -> x bar = foo
but it will fail with an error saying that it was unable to deduce the class constraint AllF Eq xs (or similar) in the definition of bar. In cases like this you can use Dict from Data.SOP.Dict to prove conversions between constraints. See this answer on SO for more details.-
relude Relude.Monoid Boolean monoid under conjunction (&&).
>>> getAll (All True <> mempty <> All False) False
>>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8])) False
-
relude Relude.Monoid No documentation available.
-
Cabal-syntax Distribution.Compat.Semigroup Boolean monoid under conjunction (&&).
>>> getAll (All True <> mempty <> All False) False
>>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8])) False
-
Cabal-syntax Distribution.Compat.Semigroup No documentation available.
-
first-class-families Fcf.Class.Foldable Whether all elements of the list satisfy a predicate. Note: this identifier conflicts with All (from Data.Monoid).
Example
>>> :kind! Eval (All (Flip (<) 6) [0,1,2,3,4,5]) Eval (All (Flip (<) 6) [0,1,2,3,4,5]) :: Bool = True
>>> :kind! Eval (All (Flip (<) 5) [0,1,2,3,4,5]) Eval (All (Flip (<) 5) [0,1,2,3,4,5]) :: Bool = False