type family (++) of type lebel list is defined in extensible.
But, undefined (++) for Record and Variant.
if defined one, We can write below code:
type A = Record '[ "aaa" >: Bool ]
type B = A ++ Record '[ "bbb" >: Bool ]
Of course, We can define A andB after defining the type of fields type FieldA = '["aaa">: Bool] without one.
But, I think that it's more useful if (++) for Record is defined.
I think that it's easy to define using PolyKInds.
type family (++) (t1 :: a) (t2 :: a) :: a where
'[] ++ ys = ys
(x ': xs) ++ ys = x ': xs ++ ys
(h :* xs) ++ (h :* ys) = h :* (xs ++ ys)
(h :| xs) ++ (h :| ys) = h :| (xs ++ ys)
type family
(++)
of type lebel list is defined in extensible.But, undefined
(++)
for Record and Variant. if defined one, We can write below code:Of course, We can define
A
andB
after defining the type of fieldstype FieldA = '["aaa">: Bool]
without one. But, I think that it's more useful if(++)
for Record is defined.I think that it's easy to define using
PolyKInds
.Can I create a PR ?