purescript-codec-argonaut
purescript-codec-argonaut copied to clipboard
Codec for homogeneous record
This question is not directly related to this library, but PS row-type "magic" capabilities.
Is it possible to code a codec maker for homogeneous record smth like below?
homoRecCodec :: ∀ @r a. Homogeneous r a => JsonCodec a -> JsonCodec (Record r)
Considering all the records' fields use the same codec, so there would be no need to code this record of codecs manually.