Skip to content

Update to v0.15.0 #44

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

JordanMartinez
Copy link
Contributor

Description of the change

Backlinking to purescript/purescript#4244

Migrates FFI to ES modules


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@JordanMartinez JordanMartinez added type: breaking change A change that requires a major version bump. purs-0.15 A reminder to address this issue or merge this PR before we release PureScript v0.15.0 labels Mar 22, 2022
@JordanMartinez
Copy link
Contributor Author

🏓 @thomashoneyman

Comment on lines +3 to +4
const nullImpl = null;
export { nullImpl as null };
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be:

Suggested change
const nullImpl = null;
export { nullImpl as null };
export const nullImpl = null;

or is the workaround necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, null is exported as is in PureScript:

module Nullable (null) where

foreign import null :: forall a. Nullable a

So, if I changed it to export const nullImpl = null;, then the PureScript code needs to be changed, too:

module Nullable (null) where

null :: forall a. Nullable a
null = nullImpl

foreign import nullImpl :: forall a. Nullable a

So, the change I've made is the lesser diff.

Copy link
Contributor

Choose a reason for hiding this comment

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

Of course; I see. Thanks!

@thomashoneyman thomashoneyman merged commit bde12d6 into purescript-contrib:main Mar 22, 2022
@thomashoneyman thomashoneyman deleted the es-modules-libraries branch March 22, 2022 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
purs-0.15 A reminder to address this issue or merge this PR before we release PureScript v0.15.0 type: breaking change A change that requires a major version bump.
Development

Successfully merging this pull request may close these issues.

2 participants