Open wclr opened 2 weeks ago
That definitely seems like it should be possible, yeah. I was going to suggest looking at Foreign.Object.fromHomogeneous
, but that's implemented as unsafeCoerce
🤣. The code for the Homogeneous
constraint it uses might be a useful starting place though: https://github.com/purescript/purescript-typelevel-prelude/blob/v7.0.0/src/Type/Row/Homogeneous.purs.
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?
Considering all the records' fields use the same codec, so there would be no need to code this record of codecs manually.