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

IsString instance for JSVal #92

Open
louispan opened this issue Apr 5, 2017 · 1 comment
Open

IsString instance for JSVal #92

louispan opened this issue Apr 5, 2017 · 1 comment

Comments

@louispan
Copy link
Contributor

louispan commented Apr 5, 2017

Can we add the following instance to GHCJS base?

instance IsString JSVal where
  fromString = jsval . Data.JSString.pack

This will make it easier to use OverloadedStrings to put JSString into JSVal (eg. as the value of a property of JavaScript.Object).

@hamishmack
Copy link
Member

Sounds good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants