-
Notifications
You must be signed in to change notification settings - Fork 85
Export getFixityOverridesForSourceFile from the Ormolu module #970
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
Conversation
ede4626
to
a47fae1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A thought: Do we maybe only want to export a more "coarse" way how to "mirror" the behavior of the ormolu
executable by e.g. providing a function
configForFile :: FilePath -> IO (Config RegionIndices)
(maybe also including some kind of verbosity argument that e.g. controls whether we log when no .cabal
file could be found) that we also use in app/Main.hs
? That way, it would be impossible to "forget" to expose new functionality in Ormolu
, and users don't have to manually assemble the Config
beforehand.
* Exported `getFixityOverridesForSourceFile` from the `Ormolu` module making | ||
it part of the stable API. [PR | ||
970](https://github.com/tweag/ormolu/pull/970). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the rule "Only the Ormolu
module is public API" codified anywhere? (I am actually not sure where I got this from.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. There has been very few guarantees about stability of the API. We did not even annotate any functions with @since
, it was always rather "use it if you'd like, but it is not as stable as a normal library would be". I think we should indeed make it more explicit what modules are supposed to be stable.
a47fae1
to
72f973c
Compare
Re |
Yeah, it seems sensible to spend some time at this point to properly define the Haskell Ormolu API:
|
Sounds good, I will rework this PR to:
|
No description provided.