Closed listx closed 1 year ago
TL;DR:
req = record (a, b, c)
works but
req = record (a, b, c, d)
does not. What am I doing wrong?
I see that record only supports tuples of 0, 2 or 3 elements: https://github.com/higherkindness/mu-haskell/blob/920cbdcbb2ce062a3103a52ae326db813fe17817/core/optics/src/Mu/Schema/Optics.hs#L65-L90. The message I'm trying to construct has 4 elements in it (well, I only noticed this today because I added a new 4th field and now my code no longer compiles).
record
If limiting the flexibility of record to a max of 3 elements is working-as-intended, what options to I have? How can I construct a Term out of my record that has more than 3 fields?
Term
OK, apparently I just needed to use toSchema (src). Sorry for the noise.
toSchema
TL;DR:
works but
does not. What am I doing wrong?
I see that
record
only supports tuples of 0, 2 or 3 elements: https://github.com/higherkindness/mu-haskell/blob/920cbdcbb2ce062a3103a52ae326db813fe17817/core/optics/src/Mu/Schema/Optics.hs#L65-L90. The message I'm trying to construct has 4 elements in it (well, I only noticed this today because I added a new 4th field and now my code no longer compiles).If limiting the flexibility of
record
to a max of 3 elements is working-as-intended, what options to I have? How can I construct aTerm
out of my record that has more than 3 fields?