Z-Data-0.2.0.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 #