Hoogle Search
Within LTS Haskell 24.2 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
generic-deriving Generics.Deriving.Monoid No documentation available.
-
hmatrix Numeric.LinearAlgebra.Data No documentation available.
-
Cabal-syntax Distribution.Compat.Semigroup No documentation available.
-
Cabal-syntax Distribution.Compat.Semigroup No documentation available.
class (
All F c xs, SListI xs) => All (c :: k -> Constraint) (xs :: [k])sop-core Data.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.class (
All F c xs, SListI xs) => All (c :: k -> Constraint) (xs :: [k])sop-core Data.SOP.Constraint 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.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 (&&).
All x <> All y = All (x && y)
Examples
>>> All True <> mempty <> All False) All {getAll = False}
>>> mconcat (map (\x -> All (even x)) [2,4,6,7,8]) All {getAll = False}
>>> All True <> mempty All {getAll = True}
-
relude Relude.Monoid No documentation available.
data
All (b :: a -> Exp Bool) (c :: t a) (d :: Bool)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