Skip to content

Conversation

@cdepillabout
Copy link

This commit adds a Data.Char.Unicode module, which is a combination of GHC's Data.Char and GHC.Unicode.

Data.Char.Unicode is a high-level module that uses low-level functions from Data.Char.Internal.

Data.Char.Internal is created with the script ubconfc. ubconfc is modified from a file of the same name in the GHC sources.

In GHC, ubconfc is used to create the C file WCsubst.c. WCsubst.c is called from GHC.Unicode.

I have modified ubconfc to produce PureScript code instead of C code.

This commit also adds the Data.Char.Internal module, which is generated
from the ubconfc script.
@cdepillabout
Copy link
Author

Data.Char.Internal is pretty rough around the edges. I wanted to get a PR up so I could get comments on what should be fixed/changed/etc.

Data.Char.Internal is also pretty long. It's currently over 4000 lines. Since the purescript-strings package is pulled in by so many other packages, it might make more sense to pull out this PR into a separate package. Maybe call it something like purescript-char-unicode or purescript-unicode.

@garyb
Copy link
Member

garyb commented Jan 15, 2016

Uh yikes, that is a big file 😄! Yeah, I was going to suggest perhaps this should be purescript-unicode rather than part of the basic strings library. Also because this module is now "difficult" to fully build (well, not really, but it won't be possible on Windows without msys or something for instance).

@paf31
Copy link
Contributor

paf31 commented Jan 15, 2016

Hmm, I think I'll have to review this over the weekend 😄

One comment though - we should update the LICENSE file.

Thanks for this! I think I agree with @garyb about the separate package though.

@cdepillabout
Copy link
Author

Pulling this out into a separate package sounds good.

Would you want the package to be in the purescript or purescript-contrib organizations? Or should I just make it a personal package?

@garyb
Copy link
Member

garyb commented Jan 16, 2016

It'd be great to have as at least a somewhat officially sanctioned library, so I'd be 👍 for contrib at least. I'll make a repo for it and add you there, and we can always bump it into purescript later.

@cdepillabout
Copy link
Author

This has been released as the purescript-unicode package.

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