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

Support text 2 #29

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

parsonsmatt
Copy link

This PR adds support for base-4.17 and text-2.

It's currently broken, most likely due to the dodgy word conversions.

@parsonsmatt parsonsmatt marked this pull request as ready for review August 23, 2022 19:17

import qualified Data.Text.Array as TA


mapTextArray :: (Char -> Char) -> TA.Array -> TA.Array
#if MIN_VERSION_base(4,17,0)
mapTextArray f src@(TA.ByteArray arr) = runST $ do
-- this implementation is lifted from the text internals
Copy link
Author

Choose a reason for hiding this comment

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

@parsonsmatt
Copy link
Author

Tests all pass locally on 9.4.1, but I haven't tried on other GHCs.

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.

1 participant