Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate Haddock identifiers #57

Open
tadfisher opened this issue Feb 17, 2023 · 1 comment
Open

Translate Haddock identifiers #57

tadfisher opened this issue Feb 17, 2023 · 1 comment

Comments

@tadfisher
Copy link
Collaborator

It would be nice to have identifier links work in the generated doc comments. Right now they all refer to the original Haskell identifiers, which often don't match because of constructorModifier, fieldLabelModifier, etc. in Options.

This likely isn't feasible for identifiers that are external to the datatype we're generating, because the datatypes containing those external identifiers would likely use different modifier options. If we care enough, we could make a ToMoatDoc class with a method mobileGen can call to get the translated identifier.

@tadfisher
Copy link
Collaborator Author

I think what makes this difficult is that we apply all the name transformations in TH, so the resulting MoatData loses the original identifier names. I wonder if we should pass Options to prettyKotlinData and prettySwiftData, and apply the transformations at runtime instead, so we could also pass [MoatData] to handle the identifier lookups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant