-
Notifications
You must be signed in to change notification settings - Fork 88
Add support for the GHC JavaScript backend (node.js) #292
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
Conversation
This adds support for the GHC JavaScript backend. The resulting code can be run on node.js.
System/Process.hs
Outdated
@@ -875,6 +897,26 @@ c_getProcessExitCode _ _ = ioError (ioeSetLocation unsupportedOperation "getProc | |||
c_waitForProcess :: PHANDLE -> Ptr CInt -> IO CInt | |||
c_waitForProcess _ _ = ioError (ioeSetLocation unsupportedOperation "waitForProcess") | |||
|
|||
#elif defined(javascript_HOST_ARCH) | |||
|
|||
-- XXX descriptive argument names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-- XXX descriptive argument names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops forgot to remove that comment when switching to short form imports
jsbits/process.js
Outdated
@@ -0,0 +1,585 @@ | |||
//#OPTIONS: CPP | |||
// XXX do we need this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work if you remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testsuite still passes if removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
What is the plan to ensure that this is tested once merged? |
The tests for
|
Yes, but in this case I'm a bit confused: At least some of these tests live in this repository and yet are still marked as broken. Are these really broken? Is there a list of tests which are fixed by this MR? |
Ben is right, these tests should be enabled with this PR:
Ideally we would add a JS backend test runner to this repo so we can tests these tests. Unfortunately it looks like the CI for this repo uses Perhaps we:
|
Sorry for late reply, I'm on holiday this week. I'll add a commit remove the |
@luite Is there a corresponding GHC MR that uses this code? |
Ah I suppose it would be useful to get a CI run there. I'll make an MR |
I missed a few expected results in the |
LGTM! |
@bgamari Could you merge this? |
This PR adds support to the
process
package to target thenode.js
JavaScript platform using the GHC JavaScript backend.This allows among other things the GHC JavaScript backend to use custom Cabal
Setup.hs
scripts.