eliminators-0.9.1: Dependently typed elimination functions using singletons
Copyright(C) 2021 Ryan Scott
LicenseBSD-style (see the file LICENSE)
MaintainerRyan Scott
StabilityExperimental
PortabilityGHC
Safe HaskellTrustworthy
LanguageGHC2021

Data.Eliminator.Monoid

Description

Eliminator functions for data types in Data.Monoid. All of these are re-exported from Data.Eliminator with the following exceptions:

Documentation

elimAll :: forall (p :: (~>) All Type) (s :: All). Sing s -> (forall (f0 :: Bool). Sing f0 -> Apply p ('All f0)) -> Apply p s Source #

type family ElimAll p s p where ... Source #

Equations

ElimAll p ('All s0) useThis = useThis s0 

elimAny :: forall (p :: (~>) Any Type) (s :: Any). Sing s -> (forall (f0 :: Bool). Sing f0 -> Apply p ('Any f0)) -> Apply p s Source #

type family ElimAny p s p where ... Source #

Equations

ElimAny p ('Any s0) useThis = useThis s0 

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 #

type family ElimDual p s p where ... Source #

Equations

ElimDual @a p ('Dual s0) useThis = useThis s0 

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 #

type family ElimFirst p s p where ... Source #

Equations

ElimFirst @a p ('First s0) useThis = useThis s0 

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 #

type family ElimLast p s p where ... Source #

Equations

ElimLast @a p ('Last s0) useThis = useThis s0 

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 #

Equations

ElimProduct @a p ('Product s0) useThis = useThis s0 

elimSum :: forall (a :: Type) (p :: (~>) (Sum a) Type) (s :: Sum a). Sing s -> (forall (f0 :: a). Sing f0 -> Apply p ('Sum f0)) -> Apply p s Source #

type family ElimSum p s p where ... Source #

Equations

ElimSum @a p ('Sum s0) useThis = useThis s0