Z-Data-0.8.3.0: Array, vector and text
Copyright(c) Dong Han 2017-2020
LicenseBSD
Maintainerwinterland1989@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Z.Data.Generics.Utils

Description

This module provides a helper class to compute product size via Generic instance, e.g. This class is useful during JSON deserializing, to decide the array length used to store record KVs.

Synopsis

Documentation

class KnownNat (PSize f) => ProductSize (f :: * -> *) Source #

type class for calculating product size.

Associated Types

type PSize f :: Nat Source #

Instances

Instances details
(KnownNat (PSize a + PSize b), ProductSize a, ProductSize b) => ProductSize (a :*: b) Source # 
Instance details

Defined in Z.Data.Generics.Utils

Associated Types

type PSize (a :*: b) :: Nat Source #

ProductSize (S1 s a) Source # 
Instance details

Defined in Z.Data.Generics.Utils

Associated Types

type PSize (S1 s a) :: Nat Source #

productSize :: forall f. KnownNat (PSize f) => Proxy# f -> Int Source #

class KnownNat (SSize f) => SumSize (f :: * -> *) Source #

Associated Types

type SSize f :: Nat Source #

Instances

Instances details
(KnownNat (SSize a + SSize b), SumSize a, SumSize b) => SumSize (a :+: b) Source # 
Instance details

Defined in Z.Data.Generics.Utils

Associated Types

type SSize (a :+: b) :: Nat Source #

SumSize (C1 c a) Source # 
Instance details

Defined in Z.Data.Generics.Utils

Associated Types

type SSize (C1 c a) :: Nat Source #

sumSize :: forall f. KnownNat (SSize f) => Proxy# f -> Int Source #