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

Separate out T.P.Data, T.P.Translations from T.P.Class. #8348

Merged
merged 2 commits into from Oct 3, 2022

Conversation

jgm
Copy link
Owner

@jgm jgm commented Oct 3, 2022

This makes T.P.Class more self-contained, and suitable for extraction into a separate package if desired.

[API changes]

  • T.P.Data is now an exported module, providing readDataFile, readDefaultDataFile (both formerly provided by T.P.Class), and also getDataFileNames (formerly unexported in T.P.App.CommandLineOptions).

  • T.P.Translations is now an exported module (along with T.P.Translations.Types), providing readTranslations, getTranslations, setTranslations, translateTerm, lookupTerm, readTranslations, Term(..), and Translations.

  • T.P.Class: readDataFile, readDefaultDataFile, setTranslations, and translateTerm are no longer exported. checkUserDataDir is now exported.

  • Text.Pandoc now exports Text.Pandoc.Data and setTranslations and translateTerm.

This makes T.P.Class more self-contained, and suitable for extraction
into a separate package if desired.

[API changes]

- T.P.Data is now an exported module, providing `readDataFile`,
  `readDefaultDataFile` (both formerly provided by T.P.Class),
  and also `getDataFileNames` (formerly unexported in
  T.P.App.CommandLineOptions).

- T.P.Translations is now an exported module (along with
  T.P.Translations.Types), providing `readTranslations`,
  `getTranslations`, `setTranslations`, `translateTerm`,
  `lookupTerm`, `readTranslations`, `Term(..)`, and `Translations`.

- T.P.Class: `readDataFile`, `readDefaultDataFile`, `setTranslations`,
  and `translateTerm` are no longer exported.
  `checkUserDataDir` is now exported.

- Text.Pandoc now exports Text.Pandoc.Data and `setTranslations`
  and `translateTerm`.
@jgm jgm requested a review from tarleb October 3, 2022 18:35
@jgm
Copy link
Owner Author

jgm commented Oct 3, 2022

I'd also like to consider breaking up T.P.Shared, so T.P.Class doesn't depend on it.
But this change is pretty self-contained.

Copy link
Collaborator

@tarleb tarleb left a comment

Choose a reason for hiding this comment

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

This is beautiful!

@jgm jgm merged commit ad05322 into master Oct 3, 2022
@jgm jgm deleted the extract-data-from-class branch October 3, 2022 20:05
@jgm jgm mentioned this pull request Oct 3, 2022
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.

None yet

2 participants