purescript-codec-argonaut icon indicating copy to clipboard operation
purescript-codec-argonaut copied to clipboard

Codec for homogeneous record

Open wclr opened this issue 1 year ago • 1 comments

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.

wclr avatar Nov 09 '24 10:11 wclr