generic-lens-core-2.0.0.0: Generically derive traversals, lenses and prisms.

Copyright(C) 2020 Csongor Kiss
LicenseBSD3
MaintainerCsongor Kiss <kiss.csongor.kiss@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

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 #

type family (xs :: [Symbol]) \\ (ys :: [Symbol]) :: [Symbol] where ... infixr 5 Source #

Equations

xs \\ '[] = xs 
'[] \\ xs = '[] 
(x ': xs) \\ (y ': ys) = Sub' (CmpSymbol x y) x y xs ys