Copyright | (C) 2021 Ryan Scott |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Ryan Scott |
Stability | Experimental |
Portability | GHC |
Safe Haskell | Trustworthy |
Language | GHC2021 |
Eliminator functions for data types in Data.Monoid. All of these are re-exported from Data.Eliminator with the following exceptions:
First
andLast
are not re-exported from Data.Eliminator, as they clash with eliminators of the same names in Data.Eliminator.Functor and Data.Eliminator.Semigroup.Sum
andProduct
are not re-exported from Data.Eliminator, as they clash with eliminators of the same names in Data.Eliminator.Functor.
Documentation
elimAll :: forall (p :: (~>) All Type) (s :: All). Sing s -> (forall (f0 :: Bool). Sing f0 -> Apply p ('All f0)) -> Apply p s Source #
elimAny :: forall (p :: (~>) Any Type) (s :: Any). Sing s -> (forall (f0 :: Bool). Sing f0 -> Apply p ('Any f0)) -> Apply p s Source #
elimDual :: forall (a :: Type) (p :: (~>) (Dual a) Type) (s :: Dual a). Sing s -> (forall (f0 :: a). Sing f0 -> Apply p ('Dual f0)) -> Apply p s Source #
elimFirst :: forall (a :: Type) (p :: (~>) (First a) Type) (s :: First a). Sing s -> (forall (f0 :: Maybe a). Sing f0 -> Apply p ('First f0)) -> Apply p s Source #
elimLast :: forall (a :: Type) (p :: (~>) (Last a) Type) (s :: Last a). Sing s -> (forall (f0 :: Maybe a). Sing f0 -> Apply p ('Last f0)) -> Apply p s Source #
elimProduct :: forall (a :: Type) (p :: (~>) (Product a) Type) (s :: Product a). Sing s -> (forall (f0 :: a). Sing f0 -> Apply p ('Product f0)) -> Apply p s Source #
type family ElimProduct p s p where ... Source #
ElimProduct @a p ('Product s0) useThis = useThis s0 |