Skip to content

New syntax support, backwards compat cpp for ghcjs#757

Merged
dmjio merged 5 commits intomasterfrom
new-syntax
Feb 10, 2025
Merged

New syntax support, backwards compat cpp for ghcjs#757
dmjio merged 5 commits intomasterfrom
new-syntax

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
, div_ [] [ text info ]
]

#ifndef ghcjs_HOST_OS
Copy link
Contributor

@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.

Copy link
Contributor

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