| Copyright | (C) 2018 Ryan Scott |
|---|---|
| License | BSD-style (see LICENSE) |
| Maintainer | Ryan Scott |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Singletons.Prelude.Monoid
Synopsis
- class PSemigroup a => PMonoid (a :: Type) where
- class SSemigroup a => SMonoid a where
- sMempty :: Sing (MemptySym0 :: a)
- sMappend :: forall (t :: a) (t :: a). Sing t -> Sing t -> Sing (Apply (Apply MappendSym0 t) t :: a)
- sMconcat :: forall (t :: [a]). Sing t -> Sing (Apply MconcatSym0 t :: a)
- data family Sing :: k -> Type
- type family GetDual (a :: Dual a) :: a where ...
- type family GetAll (a :: All) :: Bool where ...
- type family GetAny (a :: Any) :: Bool where ...
- type family GetSum (a :: Sum a) :: a where ...
- type family GetProduct (a :: Product a) :: a where ...
- type family GetFirst (a :: First a) :: Maybe a where ...
- type family GetLast (a :: Last a) :: Maybe a where ...
- type SDual = (Sing :: Dual a -> Type)
- type SAll = (Sing :: All -> Type)
- type SAny = (Sing :: Any -> Type)
- type SSum = (Sing :: Sum a -> Type)
- type SProduct = (Sing :: Product a -> Type)
- type SFirst = (Sing :: First a -> Type)
- type SLast = (Sing :: Last a -> Type)
- type MemptySym0 = Mempty
- data MappendSym0 :: forall a6989586621680361494. (~>) a6989586621680361494 ((~>) a6989586621680361494 a6989586621680361494)
- data MappendSym1 (arg6989586621680361879 :: a6989586621680361494) :: (~>) a6989586621680361494 a6989586621680361494
- type MappendSym2 (arg6989586621680361879 :: a6989586621680361494) (arg6989586621680361880 :: a6989586621680361494) = Mappend arg6989586621680361879 arg6989586621680361880
- data MconcatSym0 :: forall a6989586621680361494. (~>) [a6989586621680361494] a6989586621680361494
- type MconcatSym1 (arg6989586621680361883 :: [a6989586621680361494]) = Mconcat arg6989586621680361883
- data DualSym0 :: forall (a6989586621679087235 :: Type). (~>) a6989586621679087235 (Dual (a6989586621679087235 :: Type))
- type DualSym1 (t6989586621679842924 :: a6989586621679087235) = Dual t6989586621679842924
- data GetDualSym0 :: forall a6989586621679087235. (~>) (Dual a6989586621679087235) a6989586621679087235
- type GetDualSym1 (a6989586621679842921 :: Dual a6989586621679087235) = GetDual a6989586621679842921
- data AllSym0 :: (~>) Bool All
- type AllSym1 (t6989586621679842938 :: Bool) = All t6989586621679842938
- data GetAllSym0 :: (~>) All Bool
- type GetAllSym1 (a6989586621679842935 :: All) = GetAll a6989586621679842935
- data AnySym0 :: (~>) Bool Any
- type AnySym1 (t6989586621679842952 :: Bool) = Any t6989586621679842952
- data GetAnySym0 :: (~>) Any Bool
- type GetAnySym1 (a6989586621679842949 :: Any) = GetAny a6989586621679842949
- data SumSym0 :: forall (a6989586621679087220 :: Type). (~>) a6989586621679087220 (Sum (a6989586621679087220 :: Type))
- type SumSym1 (t6989586621679842969 :: a6989586621679087220) = Sum t6989586621679842969
- data GetSumSym0 :: forall a6989586621679087220. (~>) (Sum a6989586621679087220) a6989586621679087220
- type GetSumSym1 (a6989586621679842966 :: Sum a6989586621679087220) = GetSum a6989586621679842966
- data ProductSym0 :: forall (a6989586621679087225 :: Type). (~>) a6989586621679087225 (Product (a6989586621679087225 :: Type))
- type ProductSym1 (t6989586621679842986 :: a6989586621679087225) = Product t6989586621679842986
- data GetProductSym0 :: forall a6989586621679087225. (~>) (Product a6989586621679087225) a6989586621679087225
- type GetProductSym1 (a6989586621679842983 :: Product a6989586621679087225) = GetProduct a6989586621679842983
- data FirstSym0 :: forall (a6989586621679087264 :: Type). (~>) (Maybe a6989586621679087264) (First (a6989586621679087264 :: Type))
- type FirstSym1 (t6989586621680365409 :: Maybe a6989586621679087264) = First t6989586621680365409
- data GetFirstSym0 :: forall a6989586621679087264. (~>) (First a6989586621679087264) (Maybe a6989586621679087264)
- type GetFirstSym1 (a6989586621680365406 :: First a6989586621679087264) = GetFirst a6989586621680365406
- data LastSym0 :: forall (a6989586621679087259 :: Type). (~>) (Maybe a6989586621679087259) (Last (a6989586621679087259 :: Type))
- type LastSym1 (t6989586621680365430 :: Maybe a6989586621679087259) = Last t6989586621680365430
- data GetLastSym0 :: forall a6989586621679087259. (~>) (Last a6989586621679087259) (Maybe a6989586621679087259)
- type GetLastSym1 (a6989586621680365427 :: Last a6989586621679087259) = GetLast a6989586621680365427
Documentation
class PSemigroup a => PMonoid (a :: Type) #
Instances
| PMonoid Ordering # | |
| PMonoid Symbol # | |
| PMonoid () # | |
| PMonoid All # | |
| PMonoid Any # | |
| PMonoid [a] # | |
| PMonoid (Maybe a) # | |
| PMonoid (Min a) # | |
| PMonoid (Max a) # | |
| PMonoid (WrappedMonoid m) # | |
| PMonoid (Option a) # | |
| PMonoid (Identity a) # | |
| PMonoid (First a) # | |
| PMonoid (Last a) # | |
| PMonoid (Dual a) # | |
| PMonoid (Sum a) # | |
| PMonoid (Product a) # | |
| PMonoid (Down a) # | |
| PMonoid (a, b) # | |
| PMonoid (a ~> b) # | |
| PMonoid (a, b, c) # | |
| PMonoid (Const a b) # | |
| PMonoid (a, b, c, d) # | |
| PMonoid (a, b, c, d, e) # | |
class SSemigroup a => SMonoid a where #
Minimal complete definition
Methods
sMempty :: Sing (MemptySym0 :: a) #
sMappend :: forall (t :: a) (t :: a). Sing t -> Sing t -> Sing (Apply (Apply MappendSym0 t) t :: a) #
sMconcat :: forall (t :: [a]). Sing t -> Sing (Apply MconcatSym0 t :: a) #
sMappend :: forall (t :: a) (t :: a). (Apply (Apply MappendSym0 t) t :: a) ~ Apply (Apply Mappend_6989586621680361897Sym0 t) t => Sing t -> Sing t -> Sing (Apply (Apply MappendSym0 t) t :: a) #
sMconcat :: forall (t :: [a]). (Apply MconcatSym0 t :: a) ~ Apply Mconcat_6989586621680361907Sym0 t => Sing t -> Sing (Apply MconcatSym0 t :: a) #
Instances
data family Sing :: k -> Type #
The singleton kind-indexed data family.
Instances
| SDecide k => TestCoercion (Sing :: k -> Type) # | |
Defined in Data.Singletons.Decide | |
| SDecide k => TestEquality (Sing :: k -> Type) # | |
Defined in Data.Singletons.Decide | |
| Show (SSymbol s) # | |
| Show (SNat n) # | |
| Eq (Sing a) # | |
| Ord (Sing a) # | |
| Show (Sing z) # | |
| (ShowSing a, ShowSing [a]) => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| Show (Sing z) # | |
| (ShowSing a, ShowSing b) => Show (Sing z) # | |
| Show (Sing a) # | |
| Show (Sing z) # | |
| (ShowSing a, ShowSing b) => Show (Sing z) # | |
| (ShowSing a, ShowSing b, ShowSing c) => Show (Sing z) # | |
| (ShowSing a, ShowSing b, ShowSing c, ShowSing d) => Show (Sing z) # | |
| (ShowSing a, ShowSing b, ShowSing c, ShowSing d, ShowSing e) => Show (Sing z) # | |
| (ShowSing a, ShowSing b, ShowSing c, ShowSing d, ShowSing e, ShowSing f) => Show (Sing z) # | |
| (ShowSing a, ShowSing b, ShowSing c, ShowSing d, ShowSing e, ShowSing f, ShowSing g) => Show (Sing z) # | |
| Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| (ShowSing a, ShowSing b) => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing m => Show (Sing z) # | |
| ShowSing (Maybe a) => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing (Maybe a) => Show (Sing z) # | |
| ShowSing (Maybe a) => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing Bool => Show (Sing z) # | |
| ShowSing Bool => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| (ShowSing a, ShowSing [a]) => Show (Sing z) # | |
| data Sing (a :: Bool) # | |
| data Sing (a :: Ordering) # | |
| data Sing (n :: Nat) # | |
| data Sing (n :: Symbol) # | |
Defined in Data.Singletons.TypeLits.Internal | |
| data Sing (a :: ()) # | |
Defined in Data.Singletons.Prelude.Instances | |
| data Sing (a :: Void) # | |
Defined in Data.Singletons.Prelude.Instances | |
| data Sing (a :: All) # | |
| data Sing (a :: Any) # | |
| data Sing (a :: PErrorMessage) # | |
Defined in Data.Singletons.TypeError data Sing (a :: PErrorMessage) where
| |
| data Sing (b :: [a]) # | |
| data Sing (b :: Maybe a) # | |
| newtype Sing (a :: TYPE rep) # | A choice of singleton for the kind Conceivably, one could generalize this instance to `Sing :: k -> Type` for
any kind We cannot produce explicit singleton values for everything in |
Defined in Data.Singletons.TypeRepTYPE | |
| data Sing (b :: Min a) # | |
| data Sing (b :: Max a) # | |
| data Sing (b :: First a) # | |
| data Sing (b :: Last a) # | |
| data Sing (a :: WrappedMonoid m) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal data Sing (a :: WrappedMonoid m) where
| |
| data Sing (b :: Option a) # | |
| data Sing (b :: Identity a) # | |
| data Sing (b :: First a) # | |
| data Sing (b :: Last a) # | |
| data Sing (b :: Dual a) # | |
| data Sing (b :: Sum a) # | |
| data Sing (b :: Product a) # | |
| data Sing (b :: Down a) # | |
| data Sing (b :: NonEmpty a) # | |
| data Sing (c :: Either a b) # | |
| data Sing (c :: (a, b)) # | |
| data Sing (c :: Arg a b) # | |
| newtype Sing (f :: k1 ~> k2) # | |
| data Sing (d :: (a, b, c)) # | |
| data Sing (c :: Const a b) # | |
| data Sing (e :: (a, b, c, d)) # | |
| data Sing (f :: (a, b, c, d, e)) # | |
| data Sing (g :: (a, b, c, d, e, f)) # | |
| data Sing (h :: (a, b, c, d, e, f, g)) # | |
Defined in Data.Singletons.Prelude.Instances | |
type family GetProduct (a :: Product a) :: a where ... #
Equations
| GetProduct (Product field) = field |
Defunctionalization symbols
type MemptySym0 = Mempty #
data MappendSym0 :: forall a6989586621680361494. (~>) a6989586621680361494 ((~>) a6989586621680361494 a6989586621680361494) #
Instances
| SMonoid a => SingI (MappendSym0 :: TyFun a (a ~> a) -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid Methods sing :: Sing MappendSym0 # | |
| SuppressUnusedWarnings (MappendSym0 :: TyFun a6989586621680361494 (a6989586621680361494 ~> a6989586621680361494) -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid Methods suppressUnusedWarnings :: () # | |
| type Apply (MappendSym0 :: TyFun a6989586621680361494 (a6989586621680361494 ~> a6989586621680361494) -> Type) (arg6989586621680361879 :: a6989586621680361494) # | |
Defined in Data.Singletons.Prelude.Monoid type Apply (MappendSym0 :: TyFun a6989586621680361494 (a6989586621680361494 ~> a6989586621680361494) -> Type) (arg6989586621680361879 :: a6989586621680361494) = MappendSym1 arg6989586621680361879 | |
data MappendSym1 (arg6989586621680361879 :: a6989586621680361494) :: (~>) a6989586621680361494 a6989586621680361494 #
Instances
| (SMonoid a, SingI d) => SingI (MappendSym1 d :: TyFun a a -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid Methods sing :: Sing (MappendSym1 d) # | |
| SuppressUnusedWarnings (MappendSym1 arg6989586621680361879 :: TyFun a6989586621680361494 a6989586621680361494 -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid Methods suppressUnusedWarnings :: () # | |
| type Apply (MappendSym1 arg6989586621680361879 :: TyFun a a -> Type) (arg6989586621680361880 :: a) # | |
Defined in Data.Singletons.Prelude.Monoid type Apply (MappendSym1 arg6989586621680361879 :: TyFun a a -> Type) (arg6989586621680361880 :: a) = Mappend arg6989586621680361879 arg6989586621680361880 | |
type MappendSym2 (arg6989586621680361879 :: a6989586621680361494) (arg6989586621680361880 :: a6989586621680361494) = Mappend arg6989586621680361879 arg6989586621680361880 #
data MconcatSym0 :: forall a6989586621680361494. (~>) [a6989586621680361494] a6989586621680361494 #
Instances
| SMonoid a => SingI (MconcatSym0 :: TyFun [a] a -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid Methods sing :: Sing MconcatSym0 # | |
| SuppressUnusedWarnings (MconcatSym0 :: TyFun [a6989586621680361494] a6989586621680361494 -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid Methods suppressUnusedWarnings :: () # | |
| type Apply (MconcatSym0 :: TyFun [a] a -> Type) (arg6989586621680361883 :: [a]) # | |
Defined in Data.Singletons.Prelude.Monoid type Apply (MconcatSym0 :: TyFun [a] a -> Type) (arg6989586621680361883 :: [a]) = Mconcat arg6989586621680361883 | |
type MconcatSym1 (arg6989586621680361883 :: [a6989586621680361494]) = Mconcat arg6989586621680361883 #
data DualSym0 :: forall (a6989586621679087235 :: Type). (~>) a6989586621679087235 (Dual (a6989586621679087235 :: Type)) #
Instances
| SingI (DualSym0 :: TyFun a (Dual a) -> Type) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
| SuppressUnusedWarnings (DualSym0 :: TyFun a6989586621679087235 (Dual a6989586621679087235) -> Type) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply (DualSym0 :: TyFun a (Dual a) -> Type) (t6989586621679842924 :: a) # | |
data GetDualSym0 :: forall a6989586621679087235. (~>) (Dual a6989586621679087235) a6989586621679087235 #
Instances
| SuppressUnusedWarnings (GetDualSym0 :: TyFun (Dual a6989586621679087235) a6989586621679087235 -> Type) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply (GetDualSym0 :: TyFun (Dual a) a -> Type) (a6989586621679842921 :: Dual a) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
type GetDualSym1 (a6989586621679842921 :: Dual a6989586621679087235) = GetDual a6989586621679842921 #
data AllSym0 :: (~>) Bool All #
Instances
| SingI AllSym0 # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
| SuppressUnusedWarnings AllSym0 # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply AllSym0 (t6989586621679842938 :: Bool) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
data GetAllSym0 :: (~>) All Bool #
Instances
| SuppressUnusedWarnings GetAllSym0 # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply GetAllSym0 (a6989586621679842935 :: All) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
type GetAllSym1 (a6989586621679842935 :: All) = GetAll a6989586621679842935 #
data AnySym0 :: (~>) Bool Any #
Instances
| SingI AnySym0 # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
| SuppressUnusedWarnings AnySym0 # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply AnySym0 (t6989586621679842952 :: Bool) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
data GetAnySym0 :: (~>) Any Bool #
Instances
| SuppressUnusedWarnings GetAnySym0 # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply GetAnySym0 (a6989586621679842949 :: Any) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
type GetAnySym1 (a6989586621679842949 :: Any) = GetAny a6989586621679842949 #
data SumSym0 :: forall (a6989586621679087220 :: Type). (~>) a6989586621679087220 (Sum (a6989586621679087220 :: Type)) #
Instances
| SingI (SumSym0 :: TyFun a (Sum a) -> Type) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
| SuppressUnusedWarnings (SumSym0 :: TyFun a6989586621679087220 (Sum a6989586621679087220) -> Type) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply (SumSym0 :: TyFun a (Sum a) -> Type) (t6989586621679842969 :: a) # | |
data GetSumSym0 :: forall a6989586621679087220. (~>) (Sum a6989586621679087220) a6989586621679087220 #
Instances
| SuppressUnusedWarnings (GetSumSym0 :: TyFun (Sum a6989586621679087220) a6989586621679087220 -> Type) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply (GetSumSym0 :: TyFun (Sum a) a -> Type) (a6989586621679842966 :: Sum a) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
type GetSumSym1 (a6989586621679842966 :: Sum a6989586621679087220) = GetSum a6989586621679842966 #
data ProductSym0 :: forall (a6989586621679087225 :: Type). (~>) a6989586621679087225 (Product (a6989586621679087225 :: Type)) #
Instances
| SingI (ProductSym0 :: TyFun a (Product a) -> Type) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods sing :: Sing ProductSym0 # | |
| SuppressUnusedWarnings (ProductSym0 :: TyFun a6989586621679087225 (Product a6989586621679087225) -> Type) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply (ProductSym0 :: TyFun a (Product a) -> Type) (t6989586621679842986 :: a) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal | |
type ProductSym1 (t6989586621679842986 :: a6989586621679087225) = Product t6989586621679842986 #
data GetProductSym0 :: forall a6989586621679087225. (~>) (Product a6989586621679087225) a6989586621679087225 #
Instances
| SuppressUnusedWarnings (GetProductSym0 :: TyFun (Product a6989586621679087225) a6989586621679087225 -> Type) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal Methods suppressUnusedWarnings :: () # | |
| type Apply (GetProductSym0 :: TyFun (Product a) a -> Type) (a6989586621679842983 :: Product a) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal type Apply (GetProductSym0 :: TyFun (Product a) a -> Type) (a6989586621679842983 :: Product a) = GetProduct a6989586621679842983 | |
type GetProductSym1 (a6989586621679842983 :: Product a6989586621679087225) = GetProduct a6989586621679842983 #
data FirstSym0 :: forall (a6989586621679087264 :: Type). (~>) (Maybe a6989586621679087264) (First (a6989586621679087264 :: Type)) #
Instances
| SingI (FirstSym0 :: TyFun (Maybe a) (First a) -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid | |
| SuppressUnusedWarnings (FirstSym0 :: TyFun (Maybe a6989586621679087264) (First a6989586621679087264) -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid Methods suppressUnusedWarnings :: () # | |
| type Apply (FirstSym0 :: TyFun (Maybe a) (First a) -> Type) (t6989586621680365409 :: Maybe a) # | |
data GetFirstSym0 :: forall a6989586621679087264. (~>) (First a6989586621679087264) (Maybe a6989586621679087264) #
Instances
| SuppressUnusedWarnings (GetFirstSym0 :: TyFun (First a6989586621679087264) (Maybe a6989586621679087264) -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid Methods suppressUnusedWarnings :: () # | |
| type Apply (GetFirstSym0 :: TyFun (First a) (Maybe a) -> Type) (a6989586621680365406 :: First a) # | |
Defined in Data.Singletons.Prelude.Monoid | |
type GetFirstSym1 (a6989586621680365406 :: First a6989586621679087264) = GetFirst a6989586621680365406 #
data LastSym0 :: forall (a6989586621679087259 :: Type). (~>) (Maybe a6989586621679087259) (Last (a6989586621679087259 :: Type)) #
Instances
| SingI (LastSym0 :: TyFun (Maybe a) (Last a) -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid | |
| SuppressUnusedWarnings (LastSym0 :: TyFun (Maybe a6989586621679087259) (Last a6989586621679087259) -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid Methods suppressUnusedWarnings :: () # | |
| type Apply (LastSym0 :: TyFun (Maybe a) (Last a) -> Type) (t6989586621680365430 :: Maybe a) # | |
data GetLastSym0 :: forall a6989586621679087259. (~>) (Last a6989586621679087259) (Maybe a6989586621679087259) #
Instances
| SuppressUnusedWarnings (GetLastSym0 :: TyFun (Last a6989586621679087259) (Maybe a6989586621679087259) -> Type) # | |
Defined in Data.Singletons.Prelude.Monoid Methods suppressUnusedWarnings :: () # | |
| type Apply (GetLastSym0 :: TyFun (Last a) (Maybe a) -> Type) (a6989586621680365427 :: Last a) # | |
Defined in Data.Singletons.Prelude.Monoid | |
type GetLastSym1 (a6989586621680365427 :: Last a6989586621679087259) = GetLast a6989586621680365427 #