Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upExpose dhall as javascript library via ghcjs WIP #58
Comments
This comment has been minimized.
This comment has been minimized.
|
Yeah, I already test drove using GHCJS on Dhall. If I remember correctly, the main issue I ran into was that the import system didn't work for URLs, but I suppose that it's still useful if people want to "Try Dhall" in the browser. The main limitation will be the absence of the Prelude |
This comment has been minimized.
This comment has been minimized.
Since we already put the whole Haskell runtime as JS into the browser, supplying the Prelude should not be that much overhead, right? |
This comment has been minimized.
This comment has been minimized.
|
Oh yeah, I forgot that we support customizable import resolution, so this should be doable if we use the Haskell API translated to JavaScript |
This comment has been minimized.
This comment has been minimized.
|
Now we just need somebody to implement a zero-copy data view from GHCJS output to Purescript structures. :P |
This comment has been minimized.
This comment has been minimized.
|
So, I’ve had some success and set up a repo.
|
This comment has been minimized.
This comment has been minimized.
|
Nice job! :) |
This comment has been minimized.
This comment has been minimized.
|
This is fixed by dhall-lang/dhall-haskell#734 |
Profpatsch commentedNov 22, 2017
I plan on playing a bit with compiling the compiler to JS, depending on the free-time I have.
A first (trivial) success:
On current nixpkgs master,
nix-build -A haskell.packages.ghcjsHEAD.dhallgives us node binaries that basically work (you have to split the shebang line of the binary manually, then it works).