module Prairie.Semigroup where
import Prairie.Class
import Prairie.Zip
appendRecord
:: forall rec. (Record rec, FieldDict Semigroup rec)
=> rec
-> rec
-> rec
appendRecord :: forall rec.
(Record rec, FieldDict Semigroup rec) =>
rec -> rec -> rec
appendRecord =
(forall ty. ty -> ty -> Field rec ty -> ty) -> rec -> rec -> rec
forall rec.
Record rec =>
(forall ty. ty -> ty -> Field rec ty -> ty) -> rec -> rec -> rec
zipWithRecord (\ty
a ty
b Field rec ty
field -> forall (c :: Type -> Constraint) rec a r.
FieldDict c rec =>
Field rec a -> (c a => r) -> r
withFieldDict @Semigroup Field rec ty
field (ty
a ty -> ty -> ty
forall a. Semigroup a => a -> a -> a
<> ty
b))