Skip to content

Improve consistency of module naming #383

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

Merged
merged 1 commit into from
Feb 15, 2022

Conversation

tbagrel1
Copy link
Member

Before 1.0 release, I think that we should ensure that our naming conventions are respected for both internal and public modules.
In this PR, I renamed:

  • System.IO.Resource -> System.IO.Resource.Linear
  • Streaming.Internal -> System.Linear.Internal
  • Data.Unrestricted.Internal -> Data.Unrestricted.Linear.Internal
  • Data.Arity.Linear.Internal.Arity -> Data.Arity.Linear.Internal

The Control.Optics directory structure seemed a bit odd to me (but I haven't changed it yet), because it contains modules not ending with either .Linear or .Linear.Internal.xxx as this is the case in every other namespace. Should we rename something for this one?

Closes #373 . Closes #380 .

+ System.IO.Resource -> System.IO.Resource.Linear
+ Streaming.Internal -> System.Linear.Internal
+ Data.Unrestricted.Internal -> Data.Unrestricted.Linear.Internal
+ Data.Arity.Linear.Internal.Arity -> Data.Arity.Linear.Internal
@@ -14,7 +14,7 @@ Linear base consists of the following:
* tools ported from [`base`] and from other critical haskell
libraries, like `lens`,
* new APIs for using system resources, e.g., file I/O in
[`System.IO.Resource`],
[`System.IO.Resource.Linear`],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is a breaking change. We will have to communicate on it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to write it down in the changelog, I suppose? Do we need to do something else?

(I am referencing the changelog issue there to not forget: #377 )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in the change log. All the breaking change will have to be clearly identified.

@aspiwack
Copy link
Member

I think that the Optics hierarchy is fine.

@tbagrel1 tbagrel1 merged commit 90dcbf0 into master Feb 15, 2022
@tbagrel1 tbagrel1 deleted the tbagrel1/improve-consistency-module-naming branch February 15, 2022 14:17
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

Successfully merging this pull request may close these issues.

Move internal modules of Data.Unrestricted under Data.Unrestricted.Linear Rename Data/Arity/Linear/Arity.hs to Data/Arity/Linear.hs for consistency
2 participants