You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently impossible to derive ToSchema, ToJSON or FromJSON from any other class.
However, as @kosmikus has pointed out during HaskellXtogether it should be possible to provide a new DSL to derive all of those (and maybe more?).
I personally rely mostly on Generic-based instances and that just works, but the problem of mismatching instances still persists for hand-written instances (which do happen on occasion). So a unifying DSL would indeed resolve that issue.
Some potential problems:
what about other common classes, such as ToHttpApiData/FromHttpApiData, ToForm/FromForm?
what about other interfaces, such as ToRow/FromRow (from postgresql-simple), CSV, XML, etc.?
unifying DSL might degrade JSON encoding/decoding performance, should we care?
What would you like to use a unifying DSL for? Any ideas are welcome!
The text was updated successfully, but these errors were encountered:
It is currently impossible to derive
ToSchema
,ToJSON
orFromJSON
from any other class.However, as @kosmikus has pointed out during HaskellXtogether it should be possible to provide a new DSL to derive all of those (and maybe more?).
I personally rely mostly on
Generic
-based instances and that just works, but the problem of mismatching instances still persists for hand-written instances (which do happen on occasion). So a unifying DSL would indeed resolve that issue.Some potential problems:
ToHttpApiData
/FromHttpApiData
,ToForm
/FromForm
?ToRow
/FromRow
(frompostgresql-simple
), CSV, XML, etc.?What would you like to use a unifying DSL for? Any ideas are welcome!
The text was updated successfully, but these errors were encountered: