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

NPM Library #10

Open
jacobstern opened this issue Jan 19, 2019 · 2 comments
Open

NPM Library #10

jacobstern opened this issue Jan 19, 2019 · 2 comments

Comments

@jacobstern
Copy link

Hi,
Are there plans to make this project into a library that can be hosted on NPM and expose a JavaScript/TypeScript API? It would be great to have an implementation of Dhall that can be consumed from JS applications. Thanks!

@MonoidMusician
Copy link
Owner

Hi! Thanks for the interest. I don't think this particular library will be suitable for a JS/TS API, since the datatypes are so different from what they would look like natively in JS. You would essentially have to commit to always using "foreign" functions to manipulate/inspect the data (although that's probably not so bad if you just use it for parsing/printing text/CBOR and normalizing/typechecking), or you would have to pay a conversion cost each time you want to transfer back and forth. I'm willing to be proven wrong, but I'm not going to put any effort towards it myself at this point. Eventually, though, I do hope to get around to implementing dhall-to-json here, and maybe that will make it more suitable for consumption outside of JS.

@toastal
Copy link

toastal commented Aug 3, 2020

Even versioning this for Spago/Pursuit would be nice -- though the Halogen stuff isn't relevant to consuming the Dhall stuff. I was looking at this as a solution to a problem, but I'll probably just shell out to dhall-to-json via the Haskell binaries for now.

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

No branches or pull requests

3 participants