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

RankNTypes #12

Closed
paf31 opened this issue Oct 10, 2013 · 2 comments
Closed

RankNTypes #12

paf31 opened this issue Oct 10, 2013 · 2 comments

Comments

@paf31
Copy link
Contributor

paf31 commented Oct 10, 2013

No description provided.

@paf31
Copy link
Contributor Author

paf31 commented Nov 26, 2013

Progress in the RankNTypes branch.

@paf31
Copy link
Contributor Author

paf31 commented Nov 28, 2013

This is experimental right now, but I'm marking it as done for this milestone.

@paf31 paf31 closed this as completed Nov 28, 2013
dunhamsteve pushed a commit to dunhamsteve/purescript that referenced this issue Jul 11, 2021
rhendric pushed a commit to rhendric/purescript that referenced this issue Feb 25, 2022
* Rename node.js to Node.js

* Remove unused Unsafe.hs
JordanMartinez added a commit that referenced this issue Feb 27, 2022
* Add ES imports/exports to CoreImp AST

* Print ES imports/exports

* Codegen ES imports for PureScript modules

* Codegen ES imports for foreign modules

* Codegen ES exports

* Extract both CJS and ES exports from foreign modules

* Remove the redundant "use strict;" pragma from modules header

ES modules are already parsed in strict mode.

* Don’t emit empty statements for empty exports lists

* Bundle ES modules

* Load ES modules with `esm` in the Node.js REPL and tests

* Escape primes in modules accessors

* Forbid unescaped primes in foreign modules exports

* Run tests against patched dependencies

* Rewrite ES modules in the browser REPL client

* Revert "Load ES modules with `esm` in the Node.js REPL and tests"

This reverts commit 7f0c07e.

* Allow Node.js to load .js files in the output directory as ES modules

Node.js loads JavaScript files with a .js extension as CommonJS modules unless they're within a directory with a `"type": "module"` package.json, in which case it loads them as ES modules.

* Import CommonJS foreign modules through an ES module wrapper

* Don't let tests nor the REPL compile into a node_modules directory

Node.js ignores the package.json file of the output directory otherwise and loads .js files as CommonJS modules.

* Bundle re-exports

* Load bundles as CommonJS modules in tests

* Update Node.js version on CI

* Disallow CommonJS exports named `default`

Node.js allows ES modules to import CommonJS modules by providing the module.exports object as their default export and named exports for statically discoverable properties of the module.exports object.

This has an unpleasant consequence for foreign imports: CommonJS exports named `default` are only available as the default property of their default export so a `default :: String` identifier imported from a CommonJS foreign module would actually have type `{ default :: String }`!

* Disallow CommonJS exports and imports in ES foreign modules

The require function and the exports object are not available in ES modules on Node.js.

* Deprecate CommonJS foreign modules

* Convert CommonJS foreign modules in tests to ES modules

* Don't optimize away dependencies of named ES exports of declarations

* fixup! Import CommonJS foreign modules through an ES module wrapper

* fixup! Don't optimize away dependencies of named ES exports of declarations

* Revert "Disallow CommonJS exports named `default`"

This reverts commit 4976eee.

* Add tests for foreign CommonJS exports named default

* Extend support to Node.js v12.0.0 with --experimental-modules

* Filter out Node.js experimental ES modules loader warning

* Update bundler error messages

* Fix HLint warnings

* Add purity annotations to function applications and constructor instantations

* Surround purity annotations in parens

* Mention es modules in version

* Add purity annotations to top-level applications only.

* Follow top-level literals as well

* Annotate all top-level-reachable applications.

* Traverse under lhs functions and operators

* Use # for annotation.

* Add comments, remove potentially aggressive cases.

* Simplify to uniform top-level IIFEs.

* Fix tests

* Add myself to contributors

* Fix experimental-modules flag required version (#11)

Improve error message

* Add i-am-the-slime to contributors

* Fix pr comments (#12)

* Rename node.js to Node.js

* Remove unused Unsafe.hs

* Add resolutions to fix dep conflicts

* Add changelog.d entry for es modules (#14)

* Update prefix to match script's expected one

* Drop unneeded whitespace

* Update src/Language/PureScript/Errors.hs

Co-authored-by: Nathan Faubion <natefaubion@users.noreply.github.com>

* Fix broken tests after spelling correction commit

* Remove temporary entries from changelog

* Refactor Pure -> Comment in CoreImp

* Refactor CoreImp modules

* Be less liberal with IIFEs

Co-authored-by: Cyril Sobierajewicz <sobierajewicz.cyril@gmail.com>
Co-authored-by: Mark Eibes <mark.eibes@gmail.com>
Co-authored-by: Nathan Faubion <nathan@awakesecurity.com>
Co-authored-by: Thomas Honeyman <hello@thomashoneyman.com>
Co-authored-by: Jordan Martinez <jordanalex.martinez@protonmail.com>
Co-authored-by: Nathan Faubion <natefaubion@users.noreply.github.com>
Co-authored-by: Ryan Hendrickson <ryan.hendrickson@alum.mit.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant