Open parsonsmatt opened 8 months ago
oh, hm, allFields
currently uses the Const
applicative, which does require a Monoid
, and is thus []
. This is because tabulateRecordA
is defined for Applicative
, which must support pure
.
allFields
could be a class method again for this, which would allow Semigroup
combinations. But I think I can punt this.
There are a few types that use
[]
instead ofNonEmpty
, which (while convenient) restrict the utility.For example,
allFields
isallFields :: (Record rec) => [SomeField rec]
. However, if we don't allow emptyRecord
s, then we can write that asNonEmpty (SomeField rec)
, which is much nicer - we can usesconcat
andSemigroup
classes generally.