| Copyright | (C) 2020 Csongor Kiss |
|---|---|
| License | BSD3 |
| Maintainer | Csongor Kiss <kiss.csongor.kiss@gmail.com> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Generics.Internal.Families.Collect
Description
Documentation
type family CollectTotalType t f :: TypeStat where ... Source #
Equations
| CollectTotalType t (C1 ('MetaCons ctor _ _) f) = AddToStat ctor (CountType t f) EmptyStat | |
| CollectTotalType t (M1 _ _ r) = CollectTotalType t r | |
| CollectTotalType t (l :+: r) = MergeStat (CollectTotalType t l) (CollectTotalType t r) |
type family CollectPartialType t f :: [Symbol] where ... Source #
Equations
| CollectPartialType t (l :+: r) = CollectPartialType t l ++ CollectPartialType t r | |
| CollectPartialType t (C1 ('MetaCons ctor _ _) f) = If (t == GTypes f) '[ctor] '[] | |
| CollectPartialType t (D1 _ f) = CollectPartialType t f |
type family CollectField t f :: TypeStat where ... Source #
Equations
| CollectField t (C1 ('MetaCons ctor _ _) f) = AddToStat ctor (CountField t f) EmptyStat | |
| CollectField t (M1 _ _ r) = CollectField t r | |
| CollectField t (l :+: r) = MergeStat (CollectField t l) (CollectField t r) |
type family CollectFieldsOrdered (r :: * -> *) :: [Symbol] where ... Source #
Equations
| CollectFieldsOrdered (l :*: r) = Merge (CollectFieldsOrdered l) (CollectFieldsOrdered r) | |
| CollectFieldsOrdered (S1 ('MetaSel ('Just name) _ _ _) _) = '[name] | |
| CollectFieldsOrdered (M1 _ m a) = CollectFieldsOrdered a | |
| CollectFieldsOrdered _ = '[] |
Constructors
| TypeStat | |
Fields
| |