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

Add support for block and scripts #75

Merged
merged 5 commits into from
Sep 17, 2022
Merged

Add support for block and scripts #75

merged 5 commits into from
Sep 17, 2022

Conversation

wismill
Copy link
Collaborator

@wismill wismill commented Jun 15, 2022

Add support for block and scripts.

@wismill
Copy link
Collaborator Author

wismill commented Jun 24, 2022

Rebased & squashed

@wismill
Copy link
Collaborator Author

wismill commented Jul 8, 2022

@harendra-kumar @adithyaov could you have a look at it?

@wismill wismill mentioned this pull request Jul 9, 2022
genBlocksModule moduleName = done <$> Fold.foldl' step initial
where

done (blocks, defs, ranges) = let ranges' = reverse ranges in unlines
Copy link
Member

Choose a reason for hiding this comment

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

Can probably use Streamly.Internal.Unicode.String.str.

Copy link
Collaborator Author

@wismill wismill Sep 13, 2022

Choose a reason for hiding this comment

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

I find reference to neither the module nor the function on Hackage. The parser is also far from optimized in many other places.

Copy link
Member

@adithyaov adithyaov left a comment

Choose a reason for hiding this comment

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

Apologies for the extremely delayed review.
Overall, LGTM!

@wismill
Copy link
Collaborator Author

wismill commented Sep 13, 2022

@harendra-kumar I will merge this soon if there is no further comment.

Copy link
Member

@harendra-kumar harendra-kumar left a comment

Choose a reason for hiding this comment

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

  • The script file is quite big, this will also make the compiled library size big, do we want to put it into a separate package like name/name-aliases?
  • To avoid making too many packages we can possibly have just two packages, we can call the lightweight package as unicode-data-core and bundle everything including unicode-data-core in the all-inclusive unicode-data package.
  • What is difference in "script" and "inScript" APIs? can inScript be derived from script? Similar question for block and inBlock.

unicode-data/lib/Unicode/Internal/Char/Blocks.hs Outdated Show resolved Hide resolved
@harendra-kumar
Copy link
Member

@wismill I think the review got delayed because this was a wip earlier and I missed when it became ready for review. If you are not getting attention for some PR please ping me or send an email requesting review on my personal email id harendra.kumar at gmail.

@wismill
Copy link
Collaborator Author

wismill commented Sep 14, 2022

  • The script file is quite big, this will also make the compiled library size big, do we want to put it into a separate package like name/name-aliases?

  • To avoid making too many packages we can possibly have just two packages, we can call the lightweight package as unicode-data-core and bundle everything including unicode-data-core in the all-inclusive unicode-data package.

I do not have a strong opinion on this. I like the idea of unicode-data-core with the bare minimum and unicode-data with “all batteries included”. But then we should define criteria where to include APIs. Currently there are 4 packages depending on unicode-data.

Let’s merge this PR and discuss the split in #82.

  • What is difference in "script" and "inScript" APIs? can inScript be derived from script? Similar question for block and inBlock.

Fixed: inScript s = (== s) . script

@wismill wismill force-pushed the wip/block_and_scripts branch from 0251b9b to 303a5ce Compare September 15, 2022 08:21
@wismill
Copy link
Collaborator Author

wismill commented Sep 15, 2022

Rebased

@wismill
Copy link
Collaborator Author

wismill commented Sep 16, 2022

@harendra-kumar I splited scripts into a new package unicode-data-scripts.

@wismill wismill merged commit 76572e6 into master Sep 17, 2022
@wismill wismill deleted the wip/block_and_scripts branch September 26, 2022 05:38
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.

3 participants