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

New syntax support, backwards compat cpp for ghcjs #757

Merged
merged 5 commits into from
Feb 10, 2025
Merged

Conversation

dmjio
Copy link
Owner

@dmjio dmjio commented Feb 9, 2025

Brings in #740, adds CPP for ghcjs.

sevanspowell and others added 5 commits February 9, 2025 17:33
- Javascript conventions have changed slightly with the GHC Javascript
  backend (from GHCJS).
  - See https://github.com/ghcjs/ghcjs-base/pull/135/files.
- Update foreign imports to match these new conventions, so compiling with GHC
  Javascript backend works.
- Update canvas2d to work with new JS backend syntax.
@dmjio dmjio merged commit 3586c0f into master Feb 10, 2025
3 checks passed
@dmjio dmjio deleted the new-syntax branch February 10, 2025 01:05
@@ -71,6 +76,22 @@ viewModel Model {..} = view
, div_ [] [ text info ]
]

#ifndef ghcjs_HOST_OS
Copy link

@alexfmpe alexfmpe Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexfmpe where do you see ghcjs_HOST_OS defined for the new JS backend?

Also, have people on both GHCJS and on >= GHC 9.0.0, so this might explain some issues I was seeing.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexfmpe where do you see ghcjs_HOST_OS defined for the new JS backend?

Hmm? AFAICT cabal considers it os(ghcjs) for both old ghcjs and new js backend https://hackage.haskell.org/package/Cabal-syntax-3.14.1.0/docs/Distribution-System.html#v:Ghcjs
unlike impl(ghcjs)
https://hackage.haskell.org/package/Cabal-syntax-3.14.1.0/docs/Distribution-Compiler.html#v:GHCJS

Copy link
Owner Author

@dmjio dmjio Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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