Skip to content

Support JSString in ChoiceString when compiling with ghcjs#32

Open
waern wants to merge 1 commit intomeiersi:task-rename-and-cleanupfrom
waern:improved-base
Open

Support JSString in ChoiceString when compiling with ghcjs#32
waern wants to merge 1 commit intomeiersi:task-rename-and-cleanupfrom
waern:improved-base

Conversation

@waern
Copy link

@waern waern commented Oct 28, 2015

This avoids costly conversions if you're writing an SPA and have JSStrings in your state.

@meiersi-da
Copy link
Collaborator

Thanks for the PR. I wonder whether there wouldn't be the possibility for a version of the Text library that uses JSString internally, but is API compatible with the default text library. That would allow us to get rid of the #ifdefs.

@asayers
Copy link
Collaborator

asayers commented Oct 29, 2015

And you'd use backpack to swap out the different implementations?

@meiersi-da
Copy link
Collaborator

Hmm..interesting. I was thinking about conditionals in the cabal file, which would probably be placed in a text frontend library that includes text-native or text-ghcjs depending on the compiler that it is compiled with.

@asayers
Copy link
Collaborator

asayers commented Oct 29, 2015

Oh yes, that also sounds like it would work (and has the benefit of using technology which exists).

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