DB
Size: a a a
DB
DB
DB
KV
DB
JS
KV
DB
KV
KV
ИБ
data TestData = TestData { f :: Int , g :: Int , k :: String } deriving (Show, Generic)class Test f where test :: f xclass FieldSpecial f where fieldS :: f xclass FieldCommon f where fieldC :: f xinstance Test f => Test (C1 c f) where test = M1 testinstance (Test f) => Test (D1 c f) where test = M1 testinstance (Test f, Test g) => Test (f :*: g) where test = test :*: testinstance FieldSpecial f => Test (S1 (MetaSel (Just "f") a b c) f) where test = M1 $ fieldSinstance {-# OVERLAPPABLE #-} (FieldCommon f, Selector c) => Test (S1 c f) where test = M1 $ fieldCinstance FieldSpecial (K1 R Int) where fieldS = K1 0instance FieldCommon (K1 R Int) where fieldC = K1 1instance FieldCommon (K1 R String) where fieldC = K1 "Test"gtest :: forall a . (Generic a, Test (Rep a)) => agtest = to $ testDB
JS
KV
YS
data TestData = TestData { f :: Int , g :: Int , k :: String } deriving (Show, Generic)class Test f where test :: f xclass FieldSpecial f where fieldS :: f xclass FieldCommon f where fieldC :: f xinstance Test f => Test (C1 c f) where test = M1 testinstance (Test f) => Test (D1 c f) where test = M1 testinstance (Test f, Test g) => Test (f :*: g) where test = test :*: testinstance FieldSpecial f => Test (S1 (MetaSel (Just "f") a b c) f) where test = M1 $ fieldSinstance {-# OVERLAPPABLE #-} (FieldCommon f, Selector c) => Test (S1 c f) where test = M1 $ fieldCinstance FieldSpecial (K1 R Int) where fieldS = K1 0instance FieldCommon (K1 R Int) where fieldC = K1 1instance FieldCommon (K1 R String) where fieldC = K1 "Test"gtest :: forall a . (Generic a, Test (Rep a)) => agtest = to $ testDB
YS
KV
DB
DB