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
When compiled, using Number will result in the following import:
importData.Aeson (Number, Value)
But this results in a compile error, as the code should be
importData.Aeson (Value(Number))
I'm not sure if support this kind of use-case makes sense for the project, but IMO it's a good feature to have when supporting binding to existing Haskell.
A possible solution I was thinking about would be adding an optional constructorOf field to the rewrite rules, so we could write it in the following way:
When trying to bind to an existing datatype (like
Aeson.Value
, for example), I believe I should add a custom rewrite rule, like:When compiled, using
Number
will result in the following import:But this results in a compile error, as the code should be
I'm not sure if support this kind of use-case makes sense for the project, but IMO it's a good feature to have when supporting binding to existing Haskell.
A possible solution I was thinking about would be adding an optional
constructorOf
field to the rewrite rules, so we could write it in the following way:And it would generate the proper import.
I'd be happy to work on this if the feature makes sense 😊
The text was updated successfully, but these errors were encountered: